fork download
  1. ; doubled letters
  2.  
  3. (define (double? str)
  4. (let loop ((cs (string->list str)))
  5. (cond ((or (null? cs) (null? (cdr cs))) #f)
  6. ((char=? (car cs) (cadr cs)) #t)
  7. (else (loop (cdr cs))))))
  8.  
  9. (define (complement f) (lambda xs (not (apply f xs))))
  10.  
  11. (define (remove-doubled words) (filter (complement double?) words))
  12.  
  13. (display
  14. (map string->symbol
  15. (remove-doubled
  16. (map symbol->string
  17. '(Now is the time for all good men to come to the aid of their country)))))
Success #stdin #stdout 0s 50224KB
stdin
Standard input is empty
stdout
(Now is the time for men to come to the aid of their country)