iterate :: (a -> a) -> a -> [a]
iterate f x = x : iterate f (f x)Under lazy evaluation, this produces successive states as demanded. An infinite spine does not require all elements to be evaluated at once; productivity still depends on the demanded computations terminating.
Articles by others on the same topic
There are currently no matching articles.