[Haskell-cafe] Computing a sorted list of products lazily

porges at porg.es porges at porg.es
Fri Apr 17 18:08:51 EDT 2009

I did something similar a while ago to solve a problem posted on StackOverflow:


Henry Laxen generalized my code a little bit so you can pass in any monotonic function (see the comments).

I'm not sure of the laziness properties of this, but it might be lazy enough... you may need to swap for a boxed array.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 270 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090418/1d8f971e/signature.bin

More information about the Haskell-Cafe mailing list