Skip to content

Commit b9415d8

Browse files
committed
Document Any.append.
As of moar source code 2017-12. See issue #1731
1 parent 098a431 commit b9415d8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/Type/Any.pod6

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -916,10 +916,14 @@ Based on C<$matcher> value can be either C<((Any))> or empty List.
916916
917917
Defined As:
918918
919-
method append(@values --> Array)
920-
921-
Initializes Any variable as empty Array and calls
922-
L«C<Array.append>|/type/Array#method_append» on it.
919+
proto method append(|) is nodal {*}
920+
multi method append(Any:U \SELF: |values --> Array)
921+
922+
In the case the instance is not a positional-thing, it instantiate it
923+
as a new L<Array|/type/Array>, otherwise clone the current
924+
instance.
925+
After that, it appends the values passed as arguments to
926+
the array obtained calling L«C<Array.append>|/type/Array#method_append» on it.
923927
924928
my $a;
925929
say $a.append; # OUTPUT: «[]␤»

0 commit comments

Comments
 (0)