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
diff --git a/src/multi-dispatch.pod b/src/multi-dispatch.pod | |
index 67ce236..eb07595 100644 | |
--- a/src/multi-dispatch.pod | |
+++ b/src/multi-dispatch.pod | |
@@ -144,12 +144,22 @@ this to count how often a type check occurs: | |
=end programlisting | |
-The first counter output is always C<0>, since the nominal types alone already | |
-determine which candidate matches best, so the where-block is never executed. |
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
rakudo$ cat constrains.p6 | |
use v6; | |
my $counter = 0; | |
multi a(Int $x) {}; | |
multi a($x where {$counter++; True}) {}; | |
a(3); | |
say $counter; |
NewerOlder