Function: any
any is a byte-compiled function defined in subr.el.gz.
Signature
(any PRED LIST)
Documentation
Non-nil if PRED is true for at least one element in LIST.
Returns the LIST suffix starting at the first element that satisfies PRED, or nil if none does.
Other relevant functions are documented in the list group.
Probably introduced at or before Emacs version 21.1.
Shortdoc
;; list
(any #'symbolp '(1 2 three 4 five))
=> (three 4 five)
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun any (pred list)
"Non-nil if PRED is true for at least one element in LIST.
Returns the LIST suffix starting at the first element that satisfies PRED,
or nil if none does."
(declare (compiler-macro
(lambda (_)
`(drop-while (lambda (x) (not (funcall ,pred x))) ,list))))
(drop-while (lambda (x) (not (funcall pred x))) list))