[Haskell-cafe] List algorithm

Mark T.B. Carroll mark at ixod.org
Tue May 22 08:50:13 EDT 2007


"Matthew Brecknell" <haskell at brecknell.org> writes:
(snip)
> This seems to work, but presumably only because it's a boxed array, and
> the construction makes no circular references.

Yes. (-:

> However, I'm doubtful that memoisation is really beneficial in this
> function. I think it only gains a constant-factor speedup, but loses the
> ability to work in constant space.

I don't know. The memoised version certainly calls the bit with the list
comprehension fewer times. I'd have to think about it more.

-- Mark



More information about the Haskell-Cafe mailing list