
14 Jan
2008
14 Jan
'08
8:38 a.m.
On Sun, Jan 13, 2008 at 12:25:53AM +0100,
Henning Thielemann
Caching is not the default, but you can easily code this by yourself: Define an array and initialize it with all function values. Because of lazy evaluation the function values are computed only when they are requested and then they persist in the array.
It works only if the argument of the function is an integer or an enumerated type. If the argument is a string and you do not know the string values in advance, you cannot use the array.