3 ms·
Also, Common Lisp has a complement function which produces a new Boolean function with the negation of the result: (complement #'evenp) vs the example: (
by Jtsummers 4y ago
Also, Common Lisp has a complement function which produces a new Boolean function with the negation of the result:
(complement #'evenp)
vs the example:
(lambda (n) (not (evenp n)))
Not much shorter by character count, but it is shorter by token count.
http://clhs.lisp.se/Body/f_comple.htm http://clhs.lisp.se/Body/f_comple.htm