Normalizing chains of .Skip() and .Take() calls
- by dtb
I'm trying to normalize arbitrary chains of .Skip() and .Take() calls to a single .Skip() call followed by an optional single .Take() call.
Here are some examples of expected results, but I'm not sure if these are correct:
.Skip(5) => .Skip(5)
.Take(7) => .Skip(0).Take(7)
.Skip(5).Skip(7) …