diff options
Diffstat (limited to '04/main.scm')
-rw-r--r-- | 04/main.scm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/04/main.scm b/04/main.scm new file mode 100644 index 0000000..c8f57bb --- /dev/null +++ b/04/main.scm @@ -0,0 +1,20 @@ +(import (chezscheme)) + +; Where the magic happens +(import (lib)) + +; Read my personal puzzle input +(define input + (call-with-input-file "input.txt" + (lambda (port) + (let loop ((line (get-line port)) + (result '())) + (if (eof-object? line) + (reverse result) + (loop (get-line port) (cons line result))))))) + +; Part 1 gives 466 for me +(printf "Part 1 solution: ~a\n" (solve-part1 input)) + +; Part 2 gives 251 for me +(printf "Part 2 solution: ~a\n" (solve-part2 input)) |