aboutsummaryrefslogtreecommitdiff
path: root/2022/template.cl
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2022-12-06 17:49:48 +0200
committerSyndamia <kamen@syndamia.com>2022-12-06 17:49:48 +0200
commit857a37cd8c0a5e95d22a4d70195f930c6401f4d7 (patch)
treefda3ac93ef5e306b9933d7691d51ea30b20451db /2022/template.cl
parent7f5f04976dbd5c21383797c49e89d69939babeb3 (diff)
downloadadvent-of-code-857a37cd8c0a5e95d22a4d70195f930c6401f4d7.tar
advent-of-code-857a37cd8c0a5e95d22a4d70195f930c6401f4d7.tar.gz
advent-of-code-857a37cd8c0a5e95d22a4d70195f930c6401f4d7.zip
[2022] Updated template, following update to senzill
Diffstat (limited to '2022/template.cl')
-rw-r--r--2022/template.cl29
1 files changed, 7 insertions, 22 deletions
diff --git a/2022/template.cl b/2022/template.cl
index f33661d..ae514fb 100644
--- a/2022/template.cl
+++ b/2022/template.cl
@@ -1,26 +1,11 @@
+
;;; https://gitlab.com/Syndamia/senzill
(require :senzill)
(use-package :senzill.collections)
+(use-package :senzill.io)
-;;; After loading this file, if you enter a blank line, code will work on each
-;;; line of input, until "end" is typed.
-;;; Otherwise, the input is taken as a filename and code will be executed
-;;; over each line in the file until EOF.
-
-(defvar *prog-input*)
-(let ((ui (read-line)))
- (if (equal ui "")
- (setq *prog-input* *standard-input*)
- (setq *prog-input* (open ui))))
-
-(let
- ((inpt (read-line *prog-input* NIL)) )
-
- (loop until (or (string= inpt "end") (not inpt)) do
- (setq inpt (read-line *prog-input* NIL)))
-
- (print 1))
-
-(if (not (eq *prog-input* *standard-input*))
- (close *prog-input*))
-
+(ask-for-stream (prog-input)
+ (let ()
+ (doread-lines (inpt :read-line-options (prog-input NIL))
+ )
+ (print 1)))