aboutsummaryrefslogtreecommitdiff
path: root/2022/puzzle-5.lisp
diff options
context:
space:
mode:
Diffstat (limited to '2022/puzzle-5.lisp')
-rw-r--r--2022/puzzle-5.lisp3
1 files changed, 2 insertions, 1 deletions
diff --git a/2022/puzzle-5.lisp b/2022/puzzle-5.lisp
index 38c884e..70c6bb6 100644
--- a/2022/puzzle-5.lisp
+++ b/2022/puzzle-5.lisp
@@ -100,12 +100,13 @@ define this operation first! |#
(with-input-from-string (s instructions)
(loop
for line = (read-line s nil)
- until (null line)
+ while line
collect
;; Parse each instruction then move the crates!
(destructuring-bind (n a b) (parse-instruction-str line)
(move-crates n a b)))))
+;; The answer is simply the first top of each stack
(defun first-round ()
(setq state (default-state))
(parse-initial-state)