Skip to content

Instantly share code, notes, and snippets.

@robhanlon22
Last active December 6, 2022 17:40
Show Gist options
  • Save robhanlon22/cc4aabf3ddf73940611d50804dfd06bb to your computer and use it in GitHub Desktop.
Save robhanlon22/cc4aabf3ddf73940611d50804dfd06bb to your computer and use it in GitHub Desktop.
aoc2022_day6.clj
(defn check
[n coll]
(loop [i 0
v coll]
(let [x (take n v)]
(cond
(< (count x) n)
nil
(= (count (set x)) n)
(+ i n)
:else
(recur (inc i) (rest v))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment