Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mention Zen slice, need for parens in P5's list x
  • Loading branch information
TimToady committed Feb 24, 2015
1 parent 99e560d commit 88bfdf0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/Language/5to6.pod
Expand Up @@ -380,6 +380,12 @@ That new feature corresponds Perl 6 C<.list> and C<.hash> methods:
my @a = $arrayref.list;
my %h = $hashref.hash;
The "Zen" slice does the same thing:
# Perl 6
my @a = $arrayref[];
my %h = $hashref{};
See S32/Containers
=head2 Operators
Expand Down Expand Up @@ -525,8 +531,8 @@ In Perl 5, C<x> was the Repetition operator.
In scalar content, C<x> would repeat a string. In Perl 6, C<x> repeats
strings in any context.
In list content, C<x> would repeat a list. In Perl 6, the new C<xx> op
repeats lists in any context.
In list content, C<x> would repeat a list—but only if the left argument
is parenthesized! In Perl 6, the new C<xx> op repeats lists in any context.
Mnemonic: x is short and xx is long, so xx is the one used for lists.
Expand Down

0 comments on commit 88bfdf0

Please sign in to comment.