From 9be1e181be4cd58c0d6dd0f1c53d8d009cf0d147 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 6 Dec 2022 07:30:40 -0500 Subject: add day 6 --- day6/both.clj | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 day6/both.clj (limited to 'day6/both.clj') diff --git a/day6/both.clj b/day6/both.clj new file mode 100644 index 0000000..817c17d --- /dev/null +++ b/day6/both.clj @@ -0,0 +1,10 @@ +(defn find-marker [data n] + (->> data + (partition n 1) + (map #(apply distinct? %)) + (take-while false?) + (#(+ n (count %))))) + +(let [data (slurp "input")] + (doseq [ind [4 14]] + (println (find-marker data ind)))) -- cgit v1.2.3