News for hackers. Stuff that matters.
Re:The computers are fast, but you don't know it by Jtsummers on Thursday June 16, 2022 @06:31PM (#31771801)
Yeah, that would work, throw it before the Where clause and change 49. Range here doesn't specify a stopping point, but a count of generated values (this makes it not quite the same as Python's range). So you'd want:

  Enumerable.Range(0,13).Select(x => 4 * x + 1).Where((e, i) => i % 3 == 0).Skip(2)
And that's equivalent to the original, short of writing a MyRange that combines the first Range and Select. Still an awful lot of work for generating 3 numbers.

There are no comments on this comment yet.