inline var

This commit is contained in:
Adam Jeniski 2025-12-05 20:46:33 -10:00
parent b0d0cf5b59
commit 2ef3eb8d2c

View File

@ -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