Range that rotate elements.
import std.algorithm : equal, cmp; import std.array : array; int[] a = [1, 2, 3]; assert(equal!equal(a.rotator, [ [1, 2, 3], [2, 3, 1], [3, 1, 2], ])); int[] b = [3, 1, 4, 1, 5]; assert(equal(b.rotator.maximum!"cmp(a, b) == -1", [5, 3, 1, 4, 1]));
See Implementation
Range that rotate elements.