(let loop((foo 0) (bar (read-char)) ) (if (eof-object? bar) (begin (display foo) (newline)) (if (number? bar) (loop (+ foo bar) (read-char)) (loop foo (read-char)) ) ) )