next up previous contents index
Next: Up: Data Structures Previous: ListExceptionType   Contents   Index


ListType


Usage

ListType T: Category


Parameter Type Description
T Type the type of the list entries


Description

ListType is the category of lists of entries of type $T$.


Exports

BoundedFiniteLinearStructureType T
DynamicDataStructureType T
$+$: (%, MachineInteger) $\to$ % translate the base
append!: (%, T) $\to$ % adds an entry at the end
append!: (%, %) $\to$ % adds a list at the end
cons: (T, %) $\to$ % adds an entry at the front
delete!: (%, MachineInteger) $\to$ % remove an entry
first: % $\to$ T first entry
merge!: (%, %, (T, T) $\to$ Boolean) $\to$ % merge sorted lists
rest: % $\to$ % all entries after the first
reverse: % $\to$ % reverse a list
reverse!: % $\to$ % reverse a list in-place
setFirst!: (%, T) $\to$ T changes the first element of a list
setRest!: (%, %) $\to$ % changes the rest of a list
sort!: (%, (T, T) $\to$ Boolean) $\to$ % sort a list
split!: (%, T $\to$ Boolean) $\to$ (%, %) split a list


if $T$ has PrimitiveType then

find: (T, %) $\to$ (%, MachineInteger) linear search


if $T$ has TotallyOrderedType then

TotallyOrderedType
merge!: (%, %) $\to$ % merge sorted lists
sort!: % $\to$ % sort a list



Subsections
next up previous contents index
Next: Up: Data Structures Previous: ListExceptionType   Contents   Index
Manuel Bronstein 2004-06-28