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

| KASH3 Reference Manual

Introduction | Reference Manual | Index

search

### Function

PositionProperty ( func pred, seq() s ) -> elt-ord^rat

### Optional Arguments

Fail | any |  | Determines what to return in case of failure.

### Description

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

### Examples

PositionProperty(IsPrime,Sequence([1..100]));
PositionProperty(IsOdd,Sequence([2,4,6,8,100]));

### See also

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

| Built: Mon Nov 14 21:12:39 UTC 2005 on mack