Stream to IEnumerable; IEnumerable to chunked IEnumerable
I may have missed these in F#, and they don't seem at all obvious in C# standard libraries. A couple of handy functions/extension methods with simple tests using the Should.Fluent assertion library.
In F#:
In C#:
2 comments :
If chunk is immutable won't window return the same array forever?
If you're wanting to use Window() in a more generalized form than just reading constant sized slabs off stateful enumerations like streams, the C# version you need is in the follow-up post.
Post a Comment