Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (flatten x)
- (if (pair? x)
- (append (flatten (car x)) (flatten (cdr x)))
- (if (null? x)
- x
- (list x))))
- (define (my-flatten x) (map list (flatten x))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement