
27 Mar
2009
27 Mar
'09
4:58 p.m.
Hi Bulat, that is so cool! Günther Bulat Ziganshin schrieb:
Hello Gü?nther,
Friday, March 27, 2009, 11:30:41 PM, you wrote:
Some of the memoizing functions, they actually "remember" stuff *between* calls?
what i've seen in haskell - functions relying on lazy datastructures that ensure computation on first usage so this looks exactly like as memoizing:
power 2 n | n>=0 && n<100 = powersOfTwo!n power x y = x^y
powersOfTwo = array (0,99) [2^n | n <- [0..99] ]
it's almost exact definition from ghc Prelude