elixir-lang/elixir — pull request #1390 by pragdave (2013-07-07 23:16:02+00:00)
Title: Iterate

Add the functions `Stream.iterate` and `Stream.repeatedly`.

The former takes a seed and a function and returns a stream of values `seed`, `func(seed)`, `func(fund(seed))` and so on

The latter repeatedly invokes its parameter, returning a stream of the returned values.