Skip to content

Commit

Permalink
Completely defer foo (elem) Rage to Range.ACCEPTS
Browse files Browse the repository at this point in the history
After some discussion with scimon++
  • Loading branch information
lizmat committed Aug 15, 2018
1 parent eb8f608 commit 8abd6c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/set_elem.pm6
Expand Up @@ -41,8 +41,8 @@ multi sub infix:<(elem)>(Any $a, Map:D $b --> Bool:D) {
)
)
}
multi sub infix:<(elem)>(Int:D $a, Range:D $b --> Bool:D) {
$b.is-int ?? $b.ACCEPTS($a) !! infix:<(elem)>($a,$b.iterator)
multi sub infix:<(elem)>(\a, Range:D \b --> Bool:D) {
b.ACCEPTS(a)
}
multi sub infix:<(elem)>(Any $a, Iterable:D $b --> Bool:D) {
infix:<(elem)>($a,$b.iterator)
Expand Down

0 comments on commit 8abd6c4

Please sign in to comment.