aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2022-12-02 12:08:56 +0200
committerSyndamia <kamen@syndamia.com>2022-12-02 12:08:56 +0200
commitd7b9880ad0b157f9586797468b396e61088ac4ec (patch)
tree3ae668d0455723d1b3c2d51be078c5f027e69895
parent31f4b978338bf01e127c7332bf9af118d8f0ca9b (diff)
downloadadvent-of-code-d7b9880ad0b157f9586797468b396e61088ac4ec.tar
advent-of-code-d7b9880ad0b157f9586797468b396e61088ac4ec.tar.gz
advent-of-code-d7b9880ad0b157f9586797468b396e61088ac4ec.zip
[2022] Added a common lisp template
-rw-r--r--2022/template.cl18
1 files changed, 18 insertions, 0 deletions
diff --git a/2022/template.cl b/2022/template.cl
new file mode 100644
index 0000000..9ffb4a0
--- /dev/null
+++ b/2022/template.cl
@@ -0,0 +1,18 @@
+(defvar *prog-input*)
+
+(let ((ui (read-line)))
+ (if (equal ui "")
+ (setq *prog-input* *standard-input*)
+ (setq *prog-input* (open ui))))
+
+(let
+ ((cal (read-line *prog-input* NIL)) )
+
+ (loop until (or (equal cal "end") (not cal)) do
+ (setq cal (read-line *prog-input* NIL)))
+
+ (print 1))
+
+(if (not (eq *prog-input* *standard-input*))
+ (close *prog-input*))
+