bkboggy / morelinq

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

TakeRangeEvery method #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
TakeEvery is great for taking just one item at regular intervals, but it 
would also be useful to take a range of items at regular intervals.

TakeRangeEvery(this IEnumerable<T> items, int rangeCount, int step)

Original issue reported on code.google.com by jeffma...@gmail.com on 11 Mar 2009 at 4:22

GoogleCodeExporter commented 8 years ago
This could also be an override of TakeEvery that takes the extra count 
parameter 
rather than being a totally new method.

Original comment by jeffma...@gmail.com on 17 Mar 2009 at 3:28

GoogleCodeExporter commented 8 years ago

Original comment by azizatif on 4 Apr 2009 at 6:30

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
This is possible today using this 

http://msdn.microsoft.com/en-us/library/bb549418.aspx

public static IEnumerable<TSource> Where<TSource>(
    this IEnumerable<TSource> source,
    Func<TSource, int, bool> predicate
)

Like this:

var OneEveryTenth = coll.Where((item,i)=>(i%10)==0);
var TwoEveryTenth = coll.Where((item,i)=>(i%10)<2);

Original comment by tormod.s...@gmail.com on 16 Jun 2012 at 1:05

GoogleCodeExporter commented 8 years ago
This issue has been migrated to:
https://github.com/MoreLINQ/morelinq/issues/17
The conversation continues there.
DO NOT post any further comments to the issue tracker on Google Code as it is 
shutting down.
You can also just subscribe to the issue on GitHub to receive notifications of 
any further development.

Original comment by azizatif on 21 Aug 2015 at 6:54