diff --git a/2025/src/day09.clj b/2025/src/day09.clj index 00b9eb8..e559a03 100644 --- a/2025/src/day09.clj +++ b/2025/src/day09.clj @@ -7,7 +7,7 @@ (defn area [[ax ay] [bx by]] (* (inc (abs (- ax bx))) (inc (abs (- ay by))))) -(def furthest-points +(def largest-squares (->> (for [a input b input :when (not= a b)] @@ -17,7 +17,7 @@ (sort-by #(apply area %)))) ;; part 1 -(->> furthest-points +(->> largest-squares last (apply area)) @@ -40,7 +40,7 @@ ;; part 2 (def line-segments (map vector input (conj (vec (rest input)) (first input)))) -(->> furthest-points +(->> largest-squares (filter (fn [[a b]] (let [segments (filter (fn [[seg-a seg-b]] (and (not= a seg-a) (not= a seg-b)