diff options
Diffstat (limited to '2022')
-rw-r--r-- | 2022/puzzle-6.lisp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/2022/puzzle-6.lisp b/2022/puzzle-6.lisp index 7aed004..e26f723 100644 --- a/2022/puzzle-6.lisp +++ b/2022/puzzle-6.lisp @@ -17,7 +17,11 @@ nil)) (let* ((char-list (string-to-clist input)) - (unique-check (mapcar (lambda (x y z w) (is-unique (list x y z w))) char-list (cdr char-list) (cdr (cdr char-list)) (cdr (cdr (cdr char-list)))))) + ;; List of is-unique on 4 character subsequences of input + (unique-check (mapcar (lambda (x y z w) (is-unique (list x y z w))) + char-list (cdr char-list) + (cdr (cdr char-list)) + (cdr (cdr (cdr char-list)))))) (calculate-position (position t unique-check)))) (format t "First round: ~a~%" (first-round input)) |