mirror of
https://github.com/Ajetski/advent-of-code.git
synced 2025-09-30 09:23:17 -09:00
golf
This commit is contained in:
parent
dd3943eddd
commit
3bfcd41f4f
@ -12,9 +12,7 @@
|
|||||||
(recur (conj pyramid (mapv - (rest last-line) last-line)))))))
|
(recur (conj pyramid (mapv - (rest last-line) last-line)))))))
|
||||||
|
|
||||||
(defn solve [reduction] (->> (get-puzzle-input 9)
|
(defn solve [reduction] (->> (get-puzzle-input 9)
|
||||||
(map parse-line)
|
(map (comp reverse generate-pyramid parse-line))
|
||||||
(map generate-pyramid)
|
|
||||||
(map reverse)
|
|
||||||
(map #(reduce reduction 0 %))
|
(map #(reduce reduction 0 %))
|
||||||
(reduce +)))
|
(reduce +)))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user