Groups adjacent items that share the same key into runs.
The element type.
The type of the grouping key.
The items to group.
A function that returns the grouping key for each item.
An array of objects, each containing a key and an XSequence of adjacent items with that key.
key
Groups adjacent items that share the same key into runs.