Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
infix:<eqv> for numeric types (did not work with rats)
  • Loading branch information
moritz committed Jun 22, 2010
1 parent ad2afb5 commit 7b089e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/operators.pm
Expand Up @@ -464,6 +464,10 @@ our multi sub infix:<eqv>(EnumMap $a, EnumMap $b) {
Bool::True;
}

our multi sub infix:<eqv>(Numeric $a, Numeric $b) {
$a.WHAT === $b.WHAT && ($a cmp $b) == 0;
}

our multi sub infix:<Z>($lhs, $rhs) {
my $lhs-list = flat($lhs.list);
my $rhs-list = flat($rhs.list);
Expand Down

0 comments on commit 7b089e5

Please sign in to comment.