Skip to content

Commit 9bf044a

Browse files
committed
Document Any.pairs a little more.
Documentation comes from the source of Any shipped with Rakudo version 2017.11 built on MoarVM version 2017.11 See issue #1731
1 parent 2bc94a7 commit 9bf044a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

doc/Type/Any.pod6

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,11 +709,19 @@ TODO
709709
710710
Defined As:
711711
712-
method pairs(--> List)
712+
multi method pairs(Any:U:)
713+
multi method pairs(Any:D:)
713714
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:
715718
716719
say Any.pairs; # OUTPUT: «()␤»
720+
my $a;
721+
$a.pairs; # OUTPUT: «()»
722+
$a = Any.new;
723+
$a.pairs; # OUTPUT: «(0 => Any.new)»
724+
717725
718726
=head2 method antipairs
719727

0 commit comments

Comments
 (0)