If `Range` is infinite, this will fail, as the type of `range[i .. j]` will not match `Range`'s. Because the function is not template, it will straight up create a compile error for something like: `foreach(i, v; repeat(1).enumerate())` (so I guess that means they aren't tested...).

If you want to support them, then it goes something like this:
```D
        static if (hasSlicing!Range)
        {
            static if (hasLength!Range) //Finite RA
            {
                Result opSlice(size_t i, size_t j)
                {
                    return Result(range[i .. j], index + i);
                }
            }
            else //Infinite with slicing
            {
                static struct DollarToken {}
                enum opDollar = DollarToken.init;

                //Slice to end with matching type.
                Result opSlice(size_t i, DollarToken)
                {
                    return Result(range[i .. $], index + i);
                }

                //Finite slice.
                //The type returned needs to be Take!Result to satisfy the hasSlicing primitive.
                auto opSlice(size_t i, size_t j)
                {
                    return this[i .. $].take(j - 1);
                }
            }
        }
```

Do NOT simply have `opSlice` return `auto`. It is important for infinite ranges that `myEnumerate[1 .. 2]` should return a `Take!(Result!Range)` type, and not a `Result!(Range!Take)` type (which would be what you'd get with the "dumb" implementation).