mirror of
https://github.com/Ajetski/advent-of-code.git
synced 2025-09-30 09:23:17 -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
|
"takes in a string containing mul instructions
|
||||||
returns list of parsed integral multiplication results"
|
returns list of parsed integral multiplication results"
|
||||||
[s]
|
[s]
|
||||||
(->> s
|
(->> (c/get-match-groups #"mul\((\d{1,3}),(\d{1,3})\)" s)
|
||||||
(re-seq #"mul\((\d{1,3}),(\d{1,3})\)")
|
|
||||||
(map rest)
|
|
||||||
(map #(map parse-long %))
|
(map #(map parse-long %))
|
||||||
(map #(reduce * %))))
|
(map #(reduce * %))))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user