racket/collects/tests/mzscheme/benchmarks/shootout/sumcol.ss
2006-07-27 19:32:22 +00:00

11 lines
217 B
Scheme

;;; http://shootout.alioth.debian.org/
;;;
;;; Contributed by Eli Barzilay
(module sumcol mzscheme
(let loop ([acc 0])
(let ([n (read)])
(if (eof-object? n)
(printf "~a\n" acc)
(loop (+ acc n))))))