https://issues.dlang.org/show_bug.cgi?id=13936
--- Comment #32 from hst...@quickfur.ath.cx --- (In reply to Andrei Alexandrescu from comment #31) > (In reply to hsteoh from comment #28) > > Another note: your current implementation looks like it could be easily > > extended to handle non-equivalence predicates. All you need to do is to > > evaluate the predicate on adjacent elements vs. with the head of the group > > (IOW, just advance groupStart each time in Group.popFront). I doubt it would > > cause too much performance hit. > > That would popFront two ranges instead of one. I still very strongly suggest > we define groupBy and groupByAdjancent. No it won't. You just assign groupNext.save to groupCurrent, then call groupNext.popFront. --