meh-uk / morelinq

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

Batch should return an IEnumerable<IList<T>> #98

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Since batches are about splitting an IEnumerable into fixed sizes, every batch 
should know how many items it has, in addition to the original order of the 
source enumerable. Size + order preservation = IList.

This should break little (if any) existing code, because IList inherits 
IEnumerable. Asides from the signature, the only code change that needs to be 
made is for the underlying bucket store to be a List instead of an Array (which 
is the more LINQy approach anyways).

Original issue reported on code.google.com by a...@milyli.com on 9 Mar 2015 at 2:19

GoogleCodeExporter commented 9 years ago
Or at least IReadOnlyCollection.

Original comment by a...@milyli.com on 27 May 2015 at 1:54