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 05a5e8d commit 722b41dCopy full SHA for 722b41d
doc/Language/contexts.pod6
@@ -193,6 +193,22 @@ force this context on an object.
193
say ? 0i; # OUTPUT: «False»
194
say ! :true; # OUTPUT: «False»
195
196
+=head1 List X<|list context>
197
+
198
+There are actually several different
199
+L<list contexts|/language/list#List_contexts>, which are better explained in
200
+that page. In general, the list contextualizer is the comma C<,>
201
202
+ say (3,).^name; # OUTPUT: «List»
203
204
+and the method called in that case is also C<.list>
205
206
+=for code
207
+Any.list.^name; # OUTPUT: «List»
208
+say 3.list.^name; # OUTPUT: «List»
209
+say (^3).list; # OUTPUT: «(0 1 2)»
210
211
212
=end pod
213
214
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
0 commit comments