Created
March 30, 2010 15:32
-
-
Save mori-dev/349206 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(remove-if 'oddp '(1 2 3 4 5 6)) | |
;;=>(2 4 6) | |
(defun complement (fn) | |
(lexical-let ((fn fn)) | |
(lambda (&rest args) (not (apply fn args))))) | |
(remove-if (complement 'oddp) '(1 2 3 4 5 6)) | |
;;=>(1 3 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment