import std.range;
import std.algorithm;
import std.string;
import std.stdio;

void main()
{
  auto s = "1 2 3 4 5 6 7 8 9";
  auto iter = s.split(" ").drop(2);
        
  // How to find the unconsumed/not-split part of s here?
  // i.e. "3 4 5 6 7 8 9" NOT ["3", "4", "5", "6", "7", "8", "9"]       
  // s[??? .. $] <- what goes here?
}

split is just an example, it's a generic question if you chain multiple lazy functions and then consume a part of the data... how do you know how to slice the original buffer to point to the unconsumed data? Imagine the chain could be quite long

s.one.two.three.four.five.six.seven()

You don't really want to lazily add the inverse of all the functions and they might even be destructive so it might not be possible in all cases.

Thanks,
The Range n00b

Reply via email to