https://issues.dlang.org/show_bug.cgi?id=10754

crazymonk...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crazymonk...@gmail.com

--- Comment #1 from crazymonk...@gmail.com ---
I also dislike the wonky bringToFront; tho I think it should be in place 

my take:
```d
void rotate(T)(T foo,int i){
        auto bar=foo.cycle.drop(i).take(foo.length).array[];
        foreach(ref e;foo){
                e=bar.front;
                bar.popFront;
}}
unittest{
        auto foo=[1,2,3,4,5];
        foo.rotate(2);
        foo.writeln;
}
```

--

Reply via email to