next up previous contents index
Next: remove! Up: HashTable Previous: HashTable   Contents   Index


forget,remember


Usage

forget f
remember f


Signature

forget,remember: (K $\to$ V) $\to$ %


Parameter Type Description
f K $\to$ V a default function


Description

Creates and return an empty table with default function f. That function is used by apply and find to compute the value of the entry whenever the key is not already present in the table. In addition, the pair $(k,v)$ is entered into the table if remember was used to create it. Thus the result of remember f can be viewed as a version of f that remembers the values of its previous calls.


See Also

table



Manuel Bronstein 2004-06-28