@Monkyyy: I adopted your solution, it is perfect.

I only have one problem left:

The foreach loop with associative arrays has two cases:

`foreach(key, val; arr)` and `foreach(x; arr)`.
In the second case only the values are iterated.
With the present solution the iteration delivers (key, val) tuples.

Can this somehow be detected by the opSlice or is there another overloading
construct to be applied for this?


Addition: I noted that in the best matching [docs](https://dlang.org/spec/operatoroverloading.html#slice) only *ordinary arrays* are covered. Your solution would make a very nice addition for the case of associative arrays there. I learn't a lot from it.
Should I do an improvement request somewhere?



Reply via email to