TU-Berlin → Inst. f. Mathematik → Algebra und Zahlentheorie → KASH → Documentation → Reference Manual
KASH3 Reference Manual
search    

Function

PositionProperty ( func pred, list l ) -> elt-ord^rat

Optional Arguments

FailanyDetermines what to return in case of failure.

Description

Return the position of the first element of `l' which suffices the predicate function `pred'.
Return FAILURE if no such element exists in `l'.
Note: Apparently `pred' must have `-> elt-alg^boo' out-signature.

Examples

PositionProperty(IsPrime,[1..100]);
PositionProperty(IsOdd,[2,4,6,8,100]);
Built: Mon Nov 14 21:12:39 UTC 2005 on mack
The KANT Group