File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -800,15 +800,19 @@ Examples:
800
800
801
801
Defined as:
802
802
803
- multi sub rotate(@list, Int:D $n = 1 --> List :D)
804
- multi method rotate(List:D: Int:D $n = 1 --> List :D)
803
+ multi sub rotate(@list, Int:D $n = 1 --> Seq :D)
804
+ multi method rotate(List:D: Int:D $n = 1 --> Seq :D)
805
805
806
- Returns the list rotated by C < $n > elements.
806
+ Returns a L « C < Seq > |/type/Seq» with the list elements rotated to the left
807
+ when C < $n > is positive or to the right otherwise.
807
808
808
809
Examples:
809
810
810
- <a b c d e>.rotate(2); # <c d e a b>
811
- <a b c d e>.rotate(-1); # <e a b c d>
811
+ say <a b c d e>.rotate(2); # OUTPUT: (c d e a b)
812
+ say <a b c d e>.rotate(-1); # OUTPUT: (e a b c d)
813
+
814
+ B < Note > : Before Rakudo version 2020.06 a new C < List > was returned instead
815
+ of a C < Seq > .
812
816
813
817
= head2 routine sort
814
818
You can’t perform that action at this time.
0 commit comments