Posted By

magicrebirth on 02/12/10


Tagged

list scheme LISP flatten


Versions (?)

list flatten


 / Published in: Scheme
 

  1. (define list-flatten
  2. (lambda (l)
  3. (cond ((null? l)
  4. '())
  5. ((atom? l)
  6. (list l))
  7. (#t (append (flatten (car l)) (flatten (cdr l)))))))

Report this snippet  

You need to login to post a comment.