(define filter (lambda(p l)
(if (nullp l)
nil
(if (p (car l))
(cons (car l) (filter p (cdr l)))
(filter p (cdr l))))))
|
(define l1 (cons one
(cons two
(cons three
(cons four
nil)))))
;
(ldisp! (filter (lambda(x) (gtp x two)) l1))
--> 3
4
|
Georg P. Loczewski 2004-03-05