Skip to content

Instantly share code, notes, and snippets.

@ShimmerFairy
Created July 15, 2010 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShimmerFairy/476369 to your computer and use it in GitHub Desktop.
Save ShimmerFairy/476369 to your computer and use it in GitHub Desktop.
diff --git a/src/cheats/relops.pir b/src/cheats/relops.pir
index 416b5ab..c6a0bd1 100644
--- a/src/cheats/relops.pir
+++ b/src/cheats/relops.pir
@@ -35,23 +35,6 @@ src/cheats/cmp.pir - Perl6 comparison builtins
# .tailcall '&prefix:!'($P0)
.end
-
-.sub '&infix:<=:=>' :multi(_,_)
- .param pmc a
- .param pmc b
- $I0 = issame a, b
- .return ($I0)
-.end
-
-
-.sub '&infix:<!=:=>' :multi(_,_)
- .param pmc a
- .param pmc b
- $P0 = '&infix:<=:=>'(a, b)
- .tailcall '&prefix:!'($P0)
-.end
-
-
=back
=cut
diff --git a/src/core/operators.pm b/src/core/operators.pm
index 5b5f3b9..fe77526 100644
--- a/src/core/operators.pm
+++ b/src/core/operators.pm
@@ -271,6 +271,10 @@ our multi infix:<ge>($a, $b) {
pir::isge__ISS(~$a, ~$b) ?? True !! False
}
+our multi infix:<=:=>(Mu \$a, Mu \$b) {
+ $a.WHERE == $b.WHERE ?? True !! False;
+}
+
# XXX Lazy version would be nice in the future too.
our multi infix:<xx>(Mu \$item, $n) {
(1..$n).map( { $item } )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment