std-position-if-not


Synopsis

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

Description

STD-POSITION-IF-NOT returns the first found position (index) of the element which does not match the predicate pred. pred is a function or lambda list accepting one argument and returning either nil or non-nil.

It returns either an integer number or nil if not found.

Examples

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

Arguments

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

lst: any proper list.

Return Value

An integer number or nil.

Side Effects

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

Module

(std-require 'STDLIST)

Defined in STDLIST

#- SMALL