inline var
This commit is contained in:
parent
b0d0cf5b59
commit
2ef3eb8d2c
@ -8,12 +8,11 @@
|
|||||||
(def nums (map (comp (partial map parse-long)
|
(def nums (map (comp (partial map parse-long)
|
||||||
#(re-seq #"\d+" %))
|
#(re-seq #"\d+" %))
|
||||||
nums-raw))
|
nums-raw))
|
||||||
(def op-map {\+ +, \* *})
|
|
||||||
(def ops (->> input
|
(def ops (->> input
|
||||||
(drop-while num-line?)
|
(drop-while num-line?)
|
||||||
(first)
|
(first)
|
||||||
(filter (partial not= \space))
|
(filter (partial not= \space))
|
||||||
(mapv op-map)))
|
(mapv {\+ +, \* *})))
|
||||||
|
|
||||||
;; part 1
|
;; part 1
|
||||||
(->> nums
|
(->> nums
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user