Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get rotate working for Parcel again
Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
  • Loading branch information
snarkyboojum authored and moritz committed Jun 17, 2010
1 parent a5f844b commit 012ea2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Any-list.pm
Expand Up @@ -35,6 +35,7 @@ augment class Any {

our multi method sort(&by = &infix:<cmp>) { self.list.sort(&by); }

method rotate($n = 1) { self.list.rotate($n); }

multi method first(Mu $test) {
for @.list {
Expand Down Expand Up @@ -295,6 +296,7 @@ proto sub kv(@array) { @array.kv; }
proto sub keys(@array) { @array.keys; }
proto sub values(@array) { @array.values; }
proto sub pairs(@array) { @array.pairs; }
proto sub rotate(@array, $n = 1) { @array.rotate($n); }

multi sub sort(*@values, :&by) {
my &x = &by // (@values[0] ~~ Callable ?? @values.shift !! &infix:<cmp> );
Expand Down

0 comments on commit 012ea2b

Please sign in to comment.