# This program tests lib/pret.s. procedure main() write(fib(10)) write(fib(20)) end procedure fib(i) static fibmem local j initial { fibmem := table() fibmem[1] := fibmem[2] := 1 } if j := \fibmem[i] then return j else return fibmem[i] := fib(i - 1) + fib(i - 2) end