aoc2022/day06/day06.lisp

12 lines
318 B
Common Lisp

(defun parse-input (input)
(uiop:read-file-string input))
(defun part-one (input)
(loop :for (a b c d) :on (coerce (parse-input input) 'list)
:for i :from 4
:if (and (not (member a (list b c d)))
(not (member b (list a c d)))
(not (member c (list a b d)))
(not (member d (list a b c))))
:return i))