[Haskell-cafe] laziness blowup exercise
Bas van Dijk
v.dijk.bas at gmail.com
Thu Jul 16 03:57:25 EDT 2009
On Wed, Jul 15, 2009 at 6:35 PM, Ryan Ingram<ryani.spam at gmail.com> wrote:
> iterate' f x = x `seq` x : iterate' f (f x)
> seems better; it doesn't evaluate list elements you don't visit.
iterate'' f x = x : (iterate'' f $! f x)
...seems the most lazy strict iterate.
(Bas wishes for a type system that can express the different
strictness properties of these functions...)
More information about the Haskell-Cafe