Have anybody implemented a lazy iteration algorithm similar to

https://dlang.org/phobos/std_algorithm_iteration.html#chunkBy

that can group elements using a binary predicate being able to do to the following.

This example

    import std.ascii : isUpper, isLower;
foreach (e; ["SomeCamelCaseName"].chunkByX!((a,b) => a.isUpper && b.isLower))
    {
        writeln(e);
    }

shall print

    Some
    Camel
    Case
    Name

?

Reply via email to