Skip to content
Browse files

[Any-list] added &elems sub

Old Druid code showed that this used to work in alpha. Adding it
back.
  • Loading branch information...
1 parent 4d33bae commit e6486e55d334f3400d919db72f50d5f51459d459 @masak masak committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/Any-list.pm
View
2 src/core/Any-list.pm
@@ -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> );

0 comments on commit e6486e5

Please sign in to comment.
Something went wrong with that request. Please try again.