1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
(def data (clojure.string/split (slurp "day06") #"\n\n")) (->> data (map #(->> % (remove #{\newline}) set count)) (apply +)) ; => 6612 (->> data (map #(->> % clojure.string/split-lines (map set) (reduce clojure.set/intersection) count)) (apply +)) ; => 3268