PPT Slide
1.43
( defun flatten ( x )
( cond
( ( null x ) NIL )
( ( symbolp x ) ( list x )
( T
( append
( flatten ( first x ) )
( flatten ( rest x ) ) ) )
) )
(flatten ’((1 (2 3)) (4 5 6)(((7))))
1
4
5
6
7
2
3
( 1 2 3 4 5 6 7 )
ONE MORE
Previous slide
Next slide
Back to first slide
View graphic version