diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-12-18 14:20:52 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-12-18 14:20:52 +0100 |
commit | 5b14deaca70a8bda4093a2897d304b80c860acf0 (patch) | |
tree | 645460aa4ab8cd3f38df6ebdb35f4d2c66ce557c /2019/05 | |
parent | 5a2c0a0e9a908eda2ce4dfe03287f2a0e1a4bc11 (diff) |
Simplify
Diffstat (limited to '2019/05')
-rw-r--r-- | 2019/05/puzzles.lisp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/2019/05/puzzles.lisp b/2019/05/puzzles.lisp index c358e5a..28eb32d 100644 --- a/2019/05/puzzles.lisp +++ b/2019/05/puzzles.lisp @@ -3,15 +3,14 @@ (load "../interpreter.lisp") (defun main (filename) - (let ((stdin (make-string-input-stream - ;; START PART 1 - "1" - ;; END PART 1 START PART 2 - "5" - ;; END PART 2 - )) - (stdout (make-string-output-stream))) - (intcode:run (intcode:parse "input") stdin stdout) + (let ((stdout (make-string-output-stream))) + (intcode:run (intcode:parse "input") nil stdout :initial-arguments + ;; START PART 1 + '(1) + ;; END PART 1 START PART 2 + '(5) + ;; END PART 2 + ) (parse-integer (last-line (get-output-stream-string stdout))))) (defun last-line (string) |