blob: 370342749c7b5e0e27dd3d5874e56025a23f8386 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
;; -*- compile-command: "guile -L . -e main -s main.scm 12 13 14 < input.txt"; -*-
(use-modules (cc)
((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 (apply cc (cons (stdin-to-str) (map string->number (cdr args)))))
(newline))
|