D-Programming-Language/phobos — pull request #2606 by monarchdodra (2014-10-10 13:23:46+00:00)
Title: Introduce std.range.generate

`generate` (name up to debate) simply takes a callable, and turns it into a range. Particularly useful for things like random number generators, functions with state, or functions that modify a global state.

As requested in the forums. Pinging @MartinNowak.