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

Function

Positions ( list L, any a ) -> seq(elt-ord^rat)

Optional Arguments

Startelt-ord^ratDefault: 1
FailanyDefault: FAILURE, determines what to return in case of failure.

Description

Return all positions of occurences of `a' in `L' if `a in L' is true, and FAILURE otherwise.

Examples

L:=[1,2,1,3,4,2,3]; Positions(L,1); Positions(L,3,rec(Start:=2)); Positions(L,"foo");

Built: Mon Nov 14 21:12:39 UTC 2005 on mack
The KANT Group