Haskell iterate function (source code)

= Haskell iterate function
{c}

= Iterate function
{synonym}

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.