Skip to content

Commit

Permalink
accept more general matchers in grep
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed May 19, 2009
1 parent 9d2934e commit d0fbfbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/setting/Any-list.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ class Any is also {
fail('No values matched');
}

our List multi method grep(Code $test) {
our List multi method grep($test) {
gather {
take $_ if $test($_) for @.list;
take $_ if $_ ~~ $test for @.list;
}
}

Expand Down Expand Up @@ -125,7 +125,7 @@ multi first(Code $test, *@values) {
@values.first($test)
}

our List multi grep(Code $test, *@values) {
our List multi grep($test, *@values) {
@values.grep($test)
}

Expand Down

0 comments on commit d0fbfbe

Please sign in to comment.