std-member-if-not


Synopsis

(std-member-if-not <pred> <lst>)

Description

STD-MEMBER-IF-NOT searches the list for any not matching element and returns the rest of the list including the first found element.

In Visual Lisp it is builtin as VL-MEMBER-IF-NOT, in Vital Lisp as VLX-MEMBER-IF-NOT.

Examples

(std-member-if-not 'numberp '(0 1 2 3))        => nil
(std-member-if-not 'stringp '("0" "1" 2 "3"))  => (2 "3")

Arguments

pred: a function or lambda list accepting one argument and returning either nil or non-nil.

lst: any proper list.

Return Value

A list.

Side Effects

Beware that the predicate pred may produce any side-effects.

It may throw an stack overflow error if the recursion stack is exhausted. In plain AutoLISP this may be a maximal lisp length of about 240 (dependent of the version)

Module

(std-require 'STDLIST)

Defined in STDLIST