diff options
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) |