diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-17 14:35:41 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-17 14:35:41 +0100 |
commit | 43b15751544ae6d6044faad4847e3a7e11614af2 (patch) | |
tree | 94bf7b634e3cf94900bd4e09163e88c2316a647f | |
parent | 4352928861f68a126ecdfd1f8673a69c82aa60d6 (diff) | |
download | advent-of-code-43b15751544ae6d6044faad4847e3a7e11614af2.tar.gz advent-of-code-43b15751544ae6d6044faad4847e3a7e11614af2.tar.bz2 advent-of-code-43b15751544ae6d6044faad4847e3a7e11614af2.zip |
Better comment on puzzle-6.lisp
-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)) |