next up previous contents index
Next: generator Up: BoundedFiniteDataStructureType Previous: size   Contents   Index


findAll


Usage

for pair in findAll(t, a) repeat { (pos, val) := pair; ...}


Signature

findAll: (T, %) $\to$ Generator Cross(MachineInteger, T)


Parameter Type Description
t T the value to search for
a % a finite data structure


Description

Iterates trough all pairs $(i, x)$ such that $t = x$ (using the equality of the type T). The index i is the position of x in the iteration of t by the function generator: $i = 1$ means x is the first element generated, $i = 2$ means x is the second element generated, etc.


See Also

member?



Manuel Bronstein 2004-06-28