Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed PIR of grep and replaced with P6 version.
Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
- Loading branch information
Showing
3 changed files
with
12 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class Any is also { | ||
our List multi method grep($values: Code $test) { | ||
gather { | ||
take $_ if $test($_) for $values.list; | ||
} | ||
} | ||
} | ||
|
||
our List multi grep(Code $test, *@values) { | ||
@values.grep($test) | ||
} |