I'm currently developing a new lazy variadic generic range/algorithm substitute() at

https://github.com/nordlow/justd/blob/master/substitution.d#L261

I plan to propose for Phobos.

It is meant to be used as

    assert(`do_it`.substitute(`_`, ` `,
                              `d`, `g`,
                              `i`, `t`,
                              `t`, `o`)
                  .equal(`go to`));

I'm currently only lacking one thing ...namely a way to group the parameters of the call to a variadic function based on their offset and stride. That is if have

haystack.substitute(x0, y0,
                    x1, y1,
                    x2, y2, ...);

How do I extract x0,x1,x2 into a one parameter tuple and y0,y1,y2 into another?

Reply via email to