Skip to content

Commit 58ec437

Browse files
authored
Clarify diff between [*] and [] slices
Also mention they decont (don't see deconting in search on docs site, so linked to the Advent article)
1 parent 40471d2 commit 58ec437

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/Language/subscripts.pod6

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ In particular the I<type> can be any of the following:
210210
211211
=item a Range or a lazy Iterable, that L<truncates|#Truncating slices> in [ ]
212212
213-
=item '*' (whatever-star), that returns the full slice (as if all keys/indices were specified)
213+
=item '*' (whatever-star), reifies that returns the full slice (as if all keys/indices were specified)
214214
215215
=item any other object, that provides a single-element access rather than a slice
216216
@@ -220,6 +220,9 @@ In particular the I<type> can be any of the following:
220220
221221
=item any iterable different from the above ones, normal slice
222222
223+
The notable difference between C<*> and Zen slice (empty) is that the L<Whatever> star
224+
will cause full L<reification|/language/glossary#index-entry-Reify>, while Zen slice won't.
225+
Both versions also L<decont|https://perl6advent.wordpress.com/2017/12/02/perl-6-sigils-variables-and-containers/#decont>.
223226
224227
So even a one-element list returns a slice, whereas a bare scalar value doesn't:
225228

0 commit comments

Comments
 (0)