The snippet defines computation builder for working with IEnumerator. The bind operation (let!) reads next element from the enumerator, so the computation can be used for expressing things that cannot be written just using seq.
29 people like thisPosted: 13 years ago by Tomas Petricek
seq to IEnumerator and IEnumerable
3 people like thisPosted: 12 years ago by Graham Spiers
This snippet is basically the same as http://fssnip.net/6A, except that the element whose predicate holds ends the previous group and the element after it starts a new one. Those two snippets (Seq.groupWhen, Seq.groupAfter) would be generally equivalent to the Haskell functions 'breakBefore' and 'breakAfter' from Data.List.Grouping.
0 people like thisPosted: 12 years ago by Thorsten Meinecke
The snippet declares a function that groups adjacent elements of a sequence. A new group is started when the specified predicate holds about an element. Groups are constructed eagerly (using lists).
2 people like thisPosted: 8 years ago by Tomas Petricek