summaryrefslogtreecommitdiff
path: root/doesnt-he-have-intern-elves-for-this/main.scm
blob: 756e54ff4cbcfadd941283a298cab7aaa8952a61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
;; -*- compile-command: "guile -L . -e main -s main.scm < input.txt"; -*-
(use-modules (dhhieft)
             ((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 (dhhieft (stdin-to-str)
		    (null? (cdr args))))
  (newline))