We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bbea96 commit b25e802Copy full SHA for b25e802
doc/Type/Code.pod6
@@ -145,6 +145,12 @@ Returns a list of candidates that can be called with the given
145
L<Capture|/type/Capture>. Since C<Code> objects do not have any multiple
146
dispatch, this either returns a list with the object, or an empty list.
147
148
+ my $single = \'a'; # a single argument Capture
149
+ my $plural = \'a', 42; # a two argument Capture
150
+ my &block = { say $^a }; # a Block object, that is a subclass of Code, taking one argument
151
+ say &block.cando($single); # OUTPUT: «(-> $a { #`(Block|94212856419136) ... })»
152
+ say &block.cando($plural); # OUTPUT: «()»
153
+
154
=head2 method Str
155
156
Defined as:
0 commit comments