Skip to content

Instantly share code, notes, and snippets.

@cedric-vincent
Created December 11, 2012 11:33
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 cedric-vincent/4257923 to your computer and use it in GitHub Desktop.
Save cedric-vincent/4257923 to your computer and use it in GitHub Desktop.
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