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.
Exports
BoundedFiniteLinearStructureType T DynamicDataStructureType T :
(%, MachineInteger) %
translate the base append!: (%, T) %
adds an entry at the end append!: (%, %) %
adds a list at the end cons: (T, %) %
adds an entry at the front delete!: (%, MachineInteger) %
remove an entry first: % T
first entry merge!: (%, %, (T, T) Boolean)
%
merge sorted lists rest: % %
all entries after the first reverse: % %
reverse a list reverse!: % %
reverse a list in-place setFirst!: (%, T) T
changes the first element of a list setRest!: (%, %) %
changes the rest of a list sort!: (%, (T, T) Boolean)
%
sort a list split!: (%, T Boolean)
(%, %)
split a list
ifhas PrimitiveType then
find: (T, %) (%, MachineInteger)
linear search
ifhas TotallyOrderedType then
TotallyOrderedType merge!: (%, %) %
merge sorted lists sort!: % %
sort a list