I don't know if this post belongs to the learn section, but I'll try anyway.

I am using the std.path.pathSplitter function that returns a PathSplitter function exposing ranges primitive.

I have some question that could be generalized to other structs that expose range primitives.

1. Why can't I write foreach(i, el; pathSplitter("foor/bar").enumerate) ? 2. Supposing I want to fix this problem, what do I add to the struct? opApply? 3. Why doesn't ranges infer the iteration method at compile time so that I don't need to write enumerate?

Reply via email to