diff --git a/doc/Language/containers.pod6 b/doc/Language/containers.pod6 index 6833811bb..7351789dd 100644 --- a/doc/Language/containers.pod6 +++ b/doc/Language/containers.pod6 @@ -297,7 +297,7 @@ The C<@> character can also be used as a prefix to coerce the argument to a list my $x = (1, 2, 3); .say for @$x; # 3 iterations -However, the C«<>» is more appropriate to decontainerize items that aren't +However, the I operator C«<>» is more appropriate to decontainerize items that aren't lists: my $x = ^Inf .grep: *.is-prime; diff --git a/doc/Language/operators.pod6 b/doc/Language/operators.pod6 index 6af4b5cf4..ba7616a24 100644 --- a/doc/Language/operators.pod6 +++ b/doc/Language/operators.pod6 @@ -559,6 +559,21 @@ shortcuts, and L for a more detailed explanation of this operator's behavior and how to implement support for it in custom types. +=head2 postcircumfix C«<>» + +Decontainerization operator, which extracts the value from a container and makes it independent of the container type. + +=begin code +use JSON::Tiny; + +my $config = from-json('{ "files": 3, "path": "/home/perl6/perl6.pod6" }'); +say $config.perl; # OUTPUT: «${:files(3), :path("/home/perl6/perl6.pod6")}» +my %config-hash = $config<>; +say %config-hash.perl; # OUTPUT: «{:files(3), :path("/home/perl6/perl6.pod6")}» +=end code + +It's a C in both cases, and it can be used like that; however, in the first case it was in item context, and in the second case it has been extracted to its proper context. + =head2 postcircumfix C«< >» Shortcut for L|/routine/{ }#(Operators)_postcircumfix_{_}> that quotes diff --git a/doc/Language/pod.pod6 b/doc/Language/pod.pod6 index a5aa8520b..306914622 100644 --- a/doc/Language/pod.pod6 +++ b/doc/Language/pod.pod6 @@ -158,7 +158,7 @@ sub search-in-seq( Int $end, Int $number ) { » =end code -By using a matched pair of parentesis constructs such as C<()> or C<«»> the comments can extend multiple lines. This format, however, will not translate to a multi-line display by C. +By using a matched pair of parenthesis constructs such as C<()> or C<«»> the comments can extend multiple lines. This format, however, will not translate to a multi-line display by C. =head1 Block types @@ -405,7 +405,7 @@ Z Pod comments are comments that Pod renderers ignore. -Comments are useful for meta-documentation (documenting the documentation). Single-line coments use the C keyword: +Comments are useful for meta-documentation (documenting the documentation). Single-line comments use the C keyword: =begin code =comment Add more here about the algorithm