diff options
Diffstat (limited to 'password-philosophy/main.scm')
-rw-r--r-- | password-philosophy/main.scm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/password-philosophy/main.scm b/password-philosophy/main.scm new file mode 100644 index 0000000..fd62ba8 --- /dev/null +++ b/password-philosophy/main.scm @@ -0,0 +1,16 @@ +;; -*- compile-command: "guile -L . -e main -s main.scm < input.txt"; -*- +(use-modules (pp) + ((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 (pp (stdin-to-str))) + (newline)) |