From 5745b2875046d0bbe3bf25f1d03a297b624c55c6 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 10 Jun 2024 21:03:08 -0600 Subject: AoC 2015.4 p1+2 --- the-ideal-stocking-stuffer/main.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 the-ideal-stocking-stuffer/main.scm (limited to 'the-ideal-stocking-stuffer/main.scm') diff --git a/the-ideal-stocking-stuffer/main.scm b/the-ideal-stocking-stuffer/main.scm new file mode 100644 index 0000000..caa0fcb --- /dev/null +++ b/the-ideal-stocking-stuffer/main.scm @@ -0,0 +1,16 @@ +;; -*- compile-command: "guix shell guile guile-hashing -- guile -L . -e main -s main.scm abcdef 000"; -*- +(use-modules (tiss) + ((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 (tiss (cadr args) (caddr args) 0)) + (newline)) -- cgit v1.2.3