From dc2af9d6b0c050ca4ca81e4270ea0c75a447c9da Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sat, 3 Dec 2022 21:00:10 +1030 Subject: [PATCH] Undo some debug bindings --- 2022/day3.clj | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/2022/day3.clj b/2022/day3.clj index d50f090..4e5f8c9 100644 --- a/2022/day3.clj +++ b/2022/day3.clj @@ -29,10 +29,6 @@ (if (<= (count sequence) num) [sequence] (let [[head tail] (split-at num sequence)] (lazy-seq (cons head (chunker tail num)))))) -(defn three-elves [lines] ( - let [ - sets (map set lines) - common (apply clojure.set/intersection sets) - ] - (priority (first common)))) +(defn three-elves [lines] + (priority (first (apply clojure.set/intersection (map set lines))))) (println (reduce + (map three-elves (chunker elves 3)))) \ No newline at end of file