September 10, 2022 [Issue 10754] std.range.rotate? | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=10754 crazymonkyyy@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazymonkyyy@gmail.com --- Comment #1 from crazymonkyyy@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; } ``` -- |
December 17, 2022 [Issue 10754] std.range.rotate? | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=10754 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P4 -- |
Copyright © 1999-2021 by the D Language Foundation