Documentation for Generate states:
/// <example>
/// <code>
/// IEnumerable<int> 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 issue reported on code.google.com by
CodeInCh...@quantentunnel.de
on 2 Mar 2011 at 8:59