((stashValue KEY) f) x
|
|
|
|
|
|
../../../../../Macaulay2/m2/methods.m2:695:13-703:28: --source code:
stashValue = key -> f -> new CacheFunction from (x -> (
if x#?key then (
val := x#key;
if class val === CacheFunction then (
remove(x,key);
x#key = val x)
else val
)
else x#key = f x))
The object stashValue is a function closure.