groupBy package:mono-traversable

group takes a sequence and returns a list of sequences such that the concatenation of the result is equal to the argument. Each subsequence in the result contains only equal elements, using the supplied equality test.
> groupBy (==) Mississippi
[M,"i","ss","i","ss","i","pp","i"]