mirror of
https://github.com/Ajetski/advent-of-code.git
synced 2025-09-30 07:03:19 -09:00
reuse core fns
This commit is contained in:
parent
126b3a4768
commit
caa9f6415e
@ -9,9 +9,7 @@
|
||||
"takes in a string containing mul instructions
|
||||
returns list of parsed integral multiplication results"
|
||||
[s]
|
||||
(->> s
|
||||
(re-seq #"mul\((\d{1,3}),(\d{1,3})\)")
|
||||
(map rest)
|
||||
(->> (c/get-match-groups #"mul\((\d{1,3}),(\d{1,3})\)" s)
|
||||
(map #(map parse-long %))
|
||||
(map #(reduce * %))))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user