GroupSequence

Similarly to uniq, group iterates consecutive elements of the given range. The element type is Tuple!(ElementType!R, uint) because it includes the count of grouped elements seen. Elements are grouped by assessing using the predicate pred, by default "a == b". The predicate is called for pairs of neighboring elements.

Group is an input range if R is an input range, and a forward range in all other cases.

  1. struct GroupSequence(alias pred, R)
    struct GroupSequence (
    alias pred
    R
    ) if (
    isInputRange!R
    ) {
    enum bool empty;
    }
  2. GroupSequence!(pred, Range) groupSequence(Range r)

Meta