4 ms·
The Common Lisp example is a tiny bit disingenuous. Common Lisp programmers rarely write (function evenp) but instead write the shorthand version #'evenp
by dreamcompiler 4y ago
The Common Lisp example is a tiny bit disingenuous. Common Lisp programmers rarely write
(function evenp)
but instead write the shorthand version
#'evenp
- Jtsummers 4y agoAlso, 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