Function: any

any is a function alias for member-if, 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 suffix of LIST starting with the first element that satisfies PRED, or nil if none do.

Compatibility note: this function replaces cl-member-if but does not support the latter's :key KEY-FN argument. It is better to compose any KEY-FN into PRED. For example, you can replace

    (cl-member-if #'foo items :key #'bar)

with

    (member-if (lambda (x) (foo (bar x))) items)

Other relevant functions are documented in the list group.

View in manual

Probably introduced at or before Emacs version 21.1.

Shortdoc

;; list
(any #'symbolp '(1 2 three 4 five))
    => (three 4 five)

Aliases

any