Example: [1,1, 2,2,2,3,4,4] -> [1, 1], [2,2,2], [3], [4,4].
Let's call this uniqRange. This way std.algorithm.uniq could be implemented as
auto uniq(R, pred)(R input) { return uniqRange!pred(R).map!(r => r.front)); }Is there any elegant way to do this with using phobos? Or do I need to write my own range?