next up previous contents index
Next: map Up: BoundedFiniteLinearStructureType Previous: BoundedFiniteLinearStructureType   Contents   Index


linearSearch


Usage

linearSearch(t, a)
linearSearch(t, a, n)


Signature

linearSearch: (T, %, MachineInteger) $\to$ Boolean, MachineInteger, T


Parameter Type Description
t T the value to search for
a % a finite linear structure
n MachineInteger an initial index (optional)


Returns

Returns (found?, i, a.i) such that $t = a.i$ if found? is true, $t$ is not in $a$ otherwise. If the optional argument n is present, then the search starts at the entry a.n and ignores the previous ones.


See Also

findAll



Manuel Bronstein 2004-06-28