Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
infix === is an Any operator
  • Loading branch information
moritz committed Oct 2, 2011
1 parent a78398a commit f7cc866
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/core/Any.pm
Expand Up @@ -156,6 +156,9 @@ my class Any {
method reduce(&with) { self.list.reduce(&with) }
}

proto infix:<===>($?, $?) { * }
multi infix:<===>($a?) { Bool::True }
multi infix:<===>($a, $b) { $a.defined eq $b.defined && $a.WHICH === $b.WHICH }

proto infix:<cmp>($, $) { * }
multi infix:<cmp>(\$a, \$b) {
Expand Down
4 changes: 0 additions & 4 deletions src/core/Mu.pm
Expand Up @@ -280,10 +280,6 @@ sub infix:<=:=>(Mu \$x, Mu \$y) {
nqp::p6bool(nqp::iseq_i(nqp::where($x), nqp::where($y)));
}

proto infix:<===>(Mu $a?, Mu $b?) { * }
multi infix:<===>(Mu $a?) { Bool::True }
multi infix:<===>(Mu $a, Mu $b) { $a.defined eq $b.defined && $a.WHICH === $b.WHICH }

proto sub infix:<eqv>(Mu $, Mu $) { * }
multi sub infix:<eqv>(Mu $a, Mu $b) {
$a.WHAT === $b.WHAT && $a === $b
Expand Down

0 comments on commit f7cc866

Please sign in to comment.