diff options
Diffstat (limited to '2024/12')
-rw-r--r-- | 2024/12/puzzles.lisp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/2024/12/puzzles.lisp b/2024/12/puzzles.lisp index 3a02033..a07575e 100644 --- a/2024/12/puzzles.lisp +++ b/2024/12/puzzles.lisp @@ -3,8 +3,8 @@ (defparameter *seen* (make-hash-table :test #'equal)) -(defun read-grid (filename) - (with-open-file (stream filename) +(defconstant +farm+ + (with-open-file (stream "input") (let ((lines (loop for line = (read-line stream nil) while line collect (coerce line 'array)))) @@ -12,9 +12,6 @@ (length (first lines))) :initial-contents lines)))) -(defconstant +farm+ - (read-grid "input")) - (defun main () (loop with dimensions = (array-dimensions +farm+) for i from 0 below (first dimensions) |