Skip to content

Instantly share code, notes, and snippets.

@nunorc
Created April 23, 2010 10:00
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 nunorc/376404 to your computer and use it in GitHub Desktop.
Save nunorc/376404 to your computer and use it in GitHub Desktop.
rakudo$ cat constrains.p6
use v6;
my $counter = 0;
multi a(Int $x) {};
multi a($x where {$counter++; True}) {};
a(3);
say $counter;
a('str');
say $counter;
rakudo$ ./perl6 constrains.p6
0
2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment