Created
December 11, 2012 11:33
-
-
Save cedric-vincent/4257923 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class C { has $.value; method succ { !!! } }; | |
my C $x .= new(value => 2); | |
my C $y .= new(value => 4); | |
my C $z .= new(value => 3); | |
multi sub infix:<cmp> (C:D $a, C:D $b) { 'debug'.say; $a.value cmp $b.value } | |
say ?( $x cmp $y ); | |
say ?( $z ~~ $x .. $y ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment