Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Any-list] added &elems sub
Old Druid code showed that this used to work in alpha. Adding it
back.
  • Loading branch information
Carl Masak committed Nov 9, 2010
1 parent 4d33bae commit e6486e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Any-list.pm
Expand Up @@ -390,6 +390,8 @@ 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); }
proto sub elems(@array) { @array.elems; }
multi sub elems(*@list) { @list.elems; }

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

0 comments on commit e6486e5

Please sign in to comment.