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)
  2. GroupSequence!(pred, Range) groupSequence(Range r)
    GroupSequence!(pred, Range)
    groupSequence
    (
    alias pred = "a == b"
    Range
    )
    (
    Range r
    )

Meta