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 3c04f55 commit 72e466eCopy full SHA for 72e466e
doc/Type/Any.pod
@@ -101,6 +101,18 @@ Interprets the invocant as a list, and returns that L<List|/type/List>.
101
say 42.list.^name; # List
102
say 42.list.elems; # 1
103
104
+=head2 method push
105
+
106
+The method push is defined for undefined invocants and allowes to autovivify
107
+undefined to an empty C<Array>, unless the undefined value implements
108
+C<Positional> already. The argument provided will then be pushed into the
109
+newly created Array.
110
111
+ my %h;
112
+ dd %h<a>; # Any (and therefor undefined)
113
+ %h<a>.push(1); # .push on Any
114
+ dd %h; # «Hash %h = {:a($[1])}» # please not the Array
115
116
=head2 routine reverse
117
118
Defined as:
0 commit comments