Haskell iterate function
ID: haskell-iterate-function
The higher-order function
iterate :: (a -> a) -> a -> [a], satisfying iterate f x = x : iterate f (f x). Its result begins with the initial value and continues with successive applications. Lazy evaluation permits finite prefixes of this infinite list to be observed whenever the necessary applications terminate. New to topics? Read the docs here!