Document signature of function to be passed to recurrence().
Use ddoc'd unittest instead of inline code of questionable workability.
Show examples for each possible function form.
Merge pull request #2531 from quickfur/issue9535

Document expected function signature in std.range.recurrence