constantly
constantly value → function
value—an object.
function—a function.
constantly returns a function that accepts any number of arguments, that has no side-effects, and that always returns value.
(mapcar (constantly 3) '(a b c d)) → (3 3 3 3) (defmacro with-vars (vars &body forms) `((lambda ,vars ,@forms) ,@(mapcar (constantly nil) vars))) → WITH-VARS (macroexpand '(with-vars (a b) (setq a 3 b (* a a)) (list a b))) → ((LAMBDA (A B) (SETQ A 3 B (* A A)) (LIST A B)) NIL NIL), true
None.
None.
"not" => "identity" per Boyer/Kaufmann/Moore #10 (by X3J13 vote at May 4-5, 1994 meeting)
-kmp 9-May-94identity
constantly could be defined by:
(defun constantly (object) #'(lambda (&rest arguments) object))