slidingSplitter + retro

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 6 13:06:39 PDT 2014


I've almost satisfied with my new range slidingSplitter at

https://github.com/nordlow/justd/blob/master/range_ex.d#L19

All unittest work as expected except my radial test

https://github.com/nordlow/justd/blob/master/range_ex.d#L243

which, I believe, incorrectly prints

Tuple!(int[], int[])([1, 2], [3])
Tuple!(int[], int[])([1, 2], [3])
Tuple!(int[], int[])([1], [2, 3])
Tuple!(int[], int[])([1, 2, 3], [])
Tuple!(int[], int[])([], [1, 2, 3])

I cannot understand why the line

Tuple!(int[], int[])([1, 2], [3])

is printed twice at the beginning.

Have I done something wrong in my implementation of opIndex or 
opSlice?


More information about the Digitalmars-d-learn mailing list