Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
make reduce() a bit more usable, and test it
  • Loading branch information
moritz committed Apr 21, 2010
1 parent 1f638cc commit fadb800
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/core/metaops.pm
Expand Up @@ -41,6 +41,10 @@ our multi reduce(&op, $list) {
$list.reduce(&op)
}

our multi reduce(&op, *@list) {
@list.reduce(&op)
}

our multi sub hyper(&op, %lhs, %rhs, :$dwim-left, :$dwim-right) {
die "Sorry, hyper operators on hashes are not yet implemented.";
}
Expand Down
2 changes: 1 addition & 1 deletion t/spectest.data
Expand Up @@ -476,7 +476,7 @@ S32-list/join.t
# S32-list/map.t
S32-list/minmax.t
S32-list/pick.t
# S32-list/reduce.t
S32-list/reduce.t
S32-list/reverse.t
S32-list/sort.t
S32-list/uniq.t
Expand Down

0 comments on commit fadb800

Please sign in to comment.