mangonugen / morelinq

Automatically exported from code.google.com/p/morelinq
Apache License 2.0
1 stars 0 forks source link

Documentation for Generate doesn't match code #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 3d2c2abeaf68.

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