Snippets tagged ienumerator

  • Seq.groupAfter function

    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 this

    Posted: 5 years ago by Thorsten Meinecke

  • Seq.groupWhen function

    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 this

    Posted: 1 years ago by Tomas Petricek