Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
doc Any.push
  • Loading branch information
gfldex committed Jan 28, 2016
1 parent 3c04f55 commit 72e466e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/Type/Any.pod
Expand Up @@ -101,6 +101,18 @@ Interprets the invocant as a list, and returns that L<List|/type/List>.
say 42.list.^name; # List
say 42.list.elems; # 1
=head2 method push
The method push is defined for undefined invocants and allowes to autovivify
undefined to an empty C<Array>, unless the undefined value implements
C<Positional> already. The argument provided will then be pushed into the
newly created Array.
my %h;
dd %h<a>; # Any (and therefor undefined)
%h<a>.push(1); # .push on Any
dd %h; # «Hash %h = {:a($[1])}␤» # please not the Array
=head2 routine reverse
Defined as:
Expand Down

0 comments on commit 72e466e

Please sign in to comment.