5 Jun
2002
5 Jun
'02
11:15 a.m.
Oops, previous message left too soon
However, the runtime performance is less pleasing as certain subexpressions are computed over and over again (profiling with ghc
There is a Memo module in Hugs, which I just used for fib. It doesn't seem to speed it up, though: -- module Fib where import Memo slow 0 = 0 slow 1 = 1 slow n = slow (n-1) + slow (n-2) fast n = memo slow n -- Maybe I'm doing something wrong. If it would work, it might be useful for your function, too. Arjan