aboutsummaryrefslogtreecommitdiffstats
path: root/AoC2022/aocclj/src
diff options
context:
space:
mode:
Diffstat (limited to 'AoC2022/aocclj/src')
-rw-r--r--AoC2022/aocclj/src/aocclj/day06.clj9
1 files changed, 9 insertions, 0 deletions
diff --git a/AoC2022/aocclj/src/aocclj/day06.clj b/AoC2022/aocclj/src/aocclj/day06.clj
new file mode 100644
index 0000000..c333cad
--- /dev/null
+++ b/AoC2022/aocclj/src/aocclj/day06.clj
@@ -0,0 +1,9 @@
+(ns aocclj.day06)
+
+(defn solver [window input]
+ (first
+ (keep-indexed
+ (fn [idx item]
+ (when ((comp #(= window %) count set) item) (+ window idx)))
+ (partition-all window 1 input))))
+