emulator.utils.groupsequence

Members

Functions

groupSequence
GroupSequence!(pred, Range) groupSequence(Range r)

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.

Structs

GroupSequence
struct GroupSequence(alias pred, R)

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.

Meta

Authors

Andrey Penechko.