next up previous contents index
Next: [] Up: Data Structures Previous: remove!   Contents   Index


KeyEntry


Usage

import from KeyEntry(K, V)


Parameter Type Description
K Type the type of the keys
V Type the type of the entries


Description

KeyEntry(K, V) provides pairs consisting of a key from K, and a entry from V. When K is a PrimitiveType, then two pairs are equal if they share the same key. When K is a TotallyOrderedType, then the pair x is greater than the pair y if $key(x) > key(y)$. Hence key-entry pairs are useful for building tables of entries where each slot is given by a unique key.


Exports

CopyableType
[]: (K, V) $\to$ % construction of a key-entry pair
entry: % $\to$ V get the entry
explode: % $\to$ (K, V) get the key and the entry
key: % $\to$ K get the key
free!: % $\to$ () memory disposal
setEntry!: (%, V) $\to$ V change the entry
setKey!: (%, K) $\to$ K change the key


if K has PrimitiveType then

PrimitiveType


if K has TotallyOrderedType then

TotallyOrderedType



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