The line below shows the first element which is not nil
.
(message "%s" (cl-some #'(lambda (x) x) '(nil nil "hello" nil)))
;; Output: hello
Is there a built-in function which is equivalent to (lambda (x) x)
?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityidentity
is a built-in function that returns its argument unchanged:
(identity ARG)
apropos
and apropos-documentation
. For this function, "identity" is the typical name and describer, AFAIK.