I can't find any algorithm/range in Phobos that can be used to split (eagerly or lazily) a sequence using a binary predicate on adjacent elements as follows [1,2,3,5,10,11,12,13,20,21,100].splitBy!"a + 1 != b"() should evaluate to [[1,2,3], [5], [10,11,12,13], [20,21], [100]] . Is there one?