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

| KASH3 Reference Manual

Introduction | Reference Manual | Index

search

### Function

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

### Optional Arguments

Start | elt-ord^rat |  | Default: 1
Fail | any |  | Default: FAILURE, determines what to return in case of failure.

### Description

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

### Examples

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

### See also

Position ( list, any ) -> elt-ord^rat

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