[Haskell-cafe] A bit of a shock - Memoizing functions

2009-03-27 Thread Gü?nther Schmidt
Hi, um, well, I'm not even sure if I have correctly understood this. Some of the memoizing functions, they actually remember stuff *between* calls? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] A bit of a shock - Memoizing functions

2009-03-27 Thread Bulat Ziganshin
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:

Re: [Haskell-cafe] A bit of a shock - Memoizing functions

2009-03-27 Thread Jeremy Shaw
Hello, I've seen it done explicitly as is shown in the code below. 'f' in 'longest' is the function which is being memoized by the 'dp'. It's pretty slick, IMO. (not sure where this code came from. Also I may have broken it, but you get the idea): module Diff where import Data.Array -- *