ayseff/morelinq

Documentation for Generate doesn't match code

Closed this issue · 2 comments

Documentation for Generate states:
/// <example>
/// <code>
/// IEnumerable&lt;int&gt; result = Sequence.Generate(2, n => n * n).Take(6);
/// </code>
/// The <c>result</c> variable, when iterated over, will yield 2, 4, 8, 16, 32, 
and 64, in turn.
/// </example>

The code is:
current = generator(current)

I don't think that fits together. As I understand it ` Sequence.Generate(2, n 
=> n * n)` should square the current value each step and thus return 
2,4,16,256,65536,... The sequence in the example would fit 
`Sequence.Generate(2, n => 2 * n)`

Original issue reported on code.google.com by CodeInCh...@quantentunnel.de on 2 Mar 2011 at 8:59

Original comment by azizatif on 28 Dec 2012 at 10:53

  • Changed state: Accepted
  • Added labels: Component-Docs, Milestone-Release1.0
This issue was closed by revision 3d2c2abeaf68.

Original comment by azizatif on 28 Dec 2012 at 10:54

  • Changed state: Fixed