```d import std.range : cycle, drop, take; import std.stdio : writeln; int main(string[] args) { auto r = [1, 2, 3, 4, 5, 6, 7, 8]; writeln(r.cycle.drop(3).take(r.length)); return 0; } ``` Kind regards, Christian
If you are ok with using things from std.range you could use something
like this:
- rotate left an array Fausto via Digitalmars-d-learn
- Re: rotate left an array Nick Treleaven via Digitalmars-d-learn
- Re: rotate left an array Andrey Zherikov via Digitalmars-d-learn
- Re: rotate left an arr... Ali Çehreli via Digitalmars-d-learn
- Re: rotate left an... Paul Backus via Digitalmars-d-learn
- Re: rotate lef... Ali Çehreli via Digitalmars-d-learn
- Re: rotat... Paul Backus via Digitalmars-d-learn
- Re: rotat... H. S. Teoh via Digitalmars-d-learn
- Re: rotate left an... rassoc via Digitalmars-d-learn
- Re: rotate left an array Christian Köstlin via Digitalmars-d-learn