Stream.iterate

You're seeing just the function iterate, go back to Stream module for more information.
Link to this function

iterate(start_value, next_fun)

View Source

Specs

iterate(element(), (element() -> element())) :: Enumerable.t()

Emits a sequence of values, starting with start_value. Successive values are generated by calling next_fun on the previous value.

Examples

iex> Stream.iterate(0, &(&1 + 1)) |> Enum.take(5)
[0, 1, 2, 3, 4]