summaryrefslogtreecommitdiff
path: root/i-was-told-there-would-be-no-math/main.scm
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2024-06-09 23:09:57 -0600
committerbd <bdunahu@operationnull.com>2024-06-09 23:09:57 -0600
commite29188413ec6c3243f7965b4408459a7517539b3 (patch)
tree401b7a300b7fe1df7cec5230ed503baac9d9074c /i-was-told-there-would-be-no-math/main.scm
parente61508e4764d69a4ea0073f419b89ff0a06e813e (diff)
AoC 2015.2 p1+2
Diffstat (limited to 'i-was-told-there-would-be-no-math/main.scm')
-rw-r--r--i-was-told-there-would-be-no-math/main.scm16
1 files changed, 16 insertions, 0 deletions
diff --git a/i-was-told-there-would-be-no-math/main.scm b/i-was-told-there-would-be-no-math/main.scm
new file mode 100644
index 0000000..ff44435
--- /dev/null
+++ b/i-was-told-there-would-be-no-math/main.scm
@@ -0,0 +1,16 @@
+;; -*- compile-command: "guile -L . -e main -s main.scm < input.txt"; -*-
+(use-modules (iwttwbnm)
+ ((ice-9 rdelim))
+ (ice-9 binary-ports))
+
+
+(define (stdin-to-str)
+ (let loop ((result ""))
+ (let ((line (read-line)))
+ (if (eof-object? line)
+ result
+ (loop (string-append result line "\n"))))))
+
+(define (main args)
+ (display (iwttwbnm (stdin-to-str)))
+ (newline))