Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove unnecessary Junction candidate
Default for parameters is Any, not Mu.  jnthn++ for the pointer
  • Loading branch information
lizmat committed Sep 23, 2015
1 parent e741fcd commit 0cd80e4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/core/Any-iterable-methods.pm
Expand Up @@ -281,12 +281,12 @@ augment class Any {
role Grepper does Iterator {
has Mu $!iter;
has Mu $!test;
method BUILD(\list,\test) {
method BUILD(\list,Mu \test) {
$!iter = as-iterable(list).iterator;
$!test := test;
self
}
method new(\list,\test) { nqp::create(self).BUILD(list,test) }
method new(\list,Mu \test) { nqp::create(self).BUILD(list,test) }
}

proto method grep(|) is nodal { * }
Expand Down Expand Up @@ -356,9 +356,6 @@ augment class Any {
self.map(&tester);
}
}
multi method grep(Junction:D $test) is rw {
self.map({ next unless $_ ~~ $test; $_ });
}
multi method grep(Mu $test) is rw {
Seq.new(class :: does Grepper {
method pull-one() is rw {
Expand Down

0 comments on commit 0cd80e4

Please sign in to comment.