routine rotate
Documentation for routine rotate
assembled from the following types:
class List
From List
(List) routine rotate
Defined as:
multi sub rotate(, Int = 1 --> List)multi method rotate(List: Int = 1 --> List)
Returns the list rotated by $n
elements.
Examples:
<a b c d e>.rotate(2); # <c d e a b><a b c d e>.rotate(-1); # <e a b c d>