fork(1) download
  1. (define (fringe ls)
  2. (cond ((null? ls) '())
  3. ((not (pair? ls)) ls)
  4. (else (cons (car ls) (map fringe (cdr ls))))))
  5.  
  6. (define x (list 1 (list 2 (list 3 4) 5) (list 6 7)))
  7.  
  8. (display (fringe x))
Success #stdin #stdout 0.03s 8656KB
stdin
Standard input is empty
stdout
(1 (2 (3 4) 5) (6 7))