Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-06-28 18:18:32 -0700 (Thu, 28 Jun 2007)
Revision: 11162
Log message:
There was an error in the semantic checker where it rejected .STATIC
rules in functions. The following program now works as expected.
g(x) =
eprintln($"g($x)")
add($x, 1)
f(x) =
.STATIC: :key: $x
y = $(g $x)
value $y
println($(f 1))
println($(f 2))
println($(f 1))
This calls g only twice.
g(1)
2
g(2)
3
2
Of course, .STATIC rules are only for values saved between runs. We also
need the memo function.