Checks whether the predicate is not nil for one element combination

(vl-some  predicate-functionlist [list]...)



The test function. This can be any function that accepts as many arguments as there are lists provided with vl-some, and returns T on a user-specified condition. The predicate-function value can take one of the following forms:

  • A symbol (function name)
  • '(LAMBDA (A1 A2) ...)
  • (FUNCTION (LAMBDA (A1 A2) ...))

A list to be tested.

The vl-some function passes the first element of each supplied list as an argument to the test function, then the next element from each list, and so on. Evaluation stops as soon as the predicate function returns a non-nil value for an argument combination, or until all elements have been processed in one of the lists.

Return Values

The predicate value, if predicate-function returned a value other than nil; otherwise nil.


The following example checks whether nlst (a number list) has equal elements in sequence:

_$ (setq nlst (list 0 2 pi
pi 4))
(0 2 3.14159 3.14159 4)
_$ (vl-some '= nlst (cdr