On Wed, Jul 15, 2009 at 6:35 PM, Ryan Ingram<ryani.s...@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...) _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe