diff --git a/2022/day1-minimised.clj b/2022/day1-minimised.clj new file mode 100644 index 0000000..57dd93b --- /dev/null +++ b/2022/day1-minimised.clj @@ -0,0 +1,3 @@ +(def sorted-totals (sort (map #(reduce + %) (map #(map read-string %) (map clojure.string/split-lines (clojure.string/split (slurp "day1-input") #"\n\n")))))) +(println (last sorted-totals)) ; Part 1 +(println (reduce + (take-last 3 sorted-totals))) ; Part 2 \ No newline at end of file