diff --git a/2023/src/day09.clj b/2023/src/day09.clj index 12712a4..12eecf9 100644 --- a/2023/src/day09.clj +++ b/2023/src/day09.clj @@ -12,13 +12,12 @@ pyramid (recur (conj pyramid (mapv - (rest last-line) last-line))))))) -(defn solve [reduction] - (->> (get-puzzle-input 9) - (map parse-line) - (map generate-pyramid) - (map reverse) - (map #(reduce reduction 0 %)) - (reduce +))) +(defn solve [reduction] (->> (get-puzzle-input 9) + (map parse-line) + (map generate-pyramid) + (map reverse) + (map #(reduce reduction 0 %)) + (reduce +))) ;; part 1 (solve (fn [num line] (+ (peek line) num)))