fork(2) download
  1. ; exercise 1-9
  2.  
  3. (define (copy)
  4. (let loop ((c (read-char)) (prev #\p))
  5. (cond ((eof-object? c))
  6. ((and (char=? #\space c) (char=? #\space prev))
  7. (loop (read-char) c))
  8. (else (display c) (loop (read-char) c)))))
  9.  
  10. (copy)
Success #stdin #stdout 0.01s 8672KB
stdin
From the Preface:

C is a general-purpose      programming language
which features     economy of expression, modern
control flow and data     structures, and a rich
set of operators.

                        -- Kernighan and Ritchie
stdout
From the Preface:

C is a general-purpose programming language
which features economy of expression, modern
control flow and data structures, and a rich
set of operators.

 -- Kernighan and Ritchie