From 5b14deaca70a8bda4093a2897d304b80c860acf0 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 18 Dec 2024 14:20:52 +0100 Subject: Simplify --- 2019/05/puzzles.lisp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to '2019/05') 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) -- cgit v1.2.3