Closure Examples 3
Complement Example
> (defun my-complement (fn)
#'(lambda (&rest args)
(not (apply fn args))))
MY-COMPLEMENT
> (mapcar (my-complement #'oddp)
'(1 2 3 4 5 6 7 8))
(NIL T NIL T NIL T NIL T)
>
Previous slide
Next slide
Back to first slide
View graphic version