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 2bc94a7 commit 9bf044aCopy full SHA for 9bf044a
doc/Type/Any.pod6
@@ -709,11 +709,19 @@ TODO
709
710
Defined As:
711
712
- method pairs(--> List)
+ multi method pairs(Any:U:)
713
+ multi method pairs(Any:D:)
714
-Returns an empty List.
715
+Returns an empty L<List> if the invocant is undefined, otherwise
716
+converts the invocant to a L<List> via the C<list> method
717
+and calls L<List.pairs> on it:
718
719
say Any.pairs; # OUTPUT: «()»
720
+ my $a;
721
+ $a.pairs; # OUTPUT: «()»
722
+ $a = Any.new;
723
+ $a.pairs; # OUTPUT: «(0 => Any.new)»
724
+
725
726
=head2 method antipairs
727
0 commit comments