Rotator

Range that rotate elements.

Constructors

this
this(Range r)
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

popFront
void popFront()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

empty
bool empty [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
front
auto front [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
save
Rotator!Range save [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

cnt
size_t cnt;
now
Range now;
Undocumented in source.
start
Range start;
Undocumented in source.

Examples

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]));

Meta