Determines if the predicate is true for one of the list members
(vl-member-if predicate-functionlist)
The vl-member-if function passes each element in list to the function specified in predicate-function. If predicate-function returns a non-nil value, vl-member-if returns the rest of the list in the same manner as the member function.
A list, starting with the first element that passes the test and containing all elements following this in the original argument. If none of the elements passes the test condition, vl-member-if returns nil.
The following command draws a line:
_$ (COMMAND "_.LINE" '(0 10) '(30 50) nil)
nil
The following command uses vl-member-if to return association lists describing an entity, if the entity is a line:
_$ (vl-member-if
'(lambda (x) (= (cdr x) "AcDbLine"))
(entget (entlast)))
((100 . "AcDbLine") (10 0.0 10.0 0.0) (11 30.0 50.0 0.0) (210 0.0 0.0 1.0))
See Also
-
The vl-member-if-not function.