Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix syntax error and add clarification in S07-lists
  • Loading branch information
niner committed Sep 19, 2015
1 parent bdbe964 commit 3bf2eb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion S07-lists.pod
Expand Up @@ -57,7 +57,8 @@ treated as a single argument to the C<for> loop, thus the name of the rule.
for (1, 2, 3) { } # List of 3 things; 3 iterations
for [1, 2, 3] { } # Array of 3 things (put in Scalars); 3 iterations
for @a, @b { } # List of 2 things; 2 iterations
for @a, { } # List of 1 thing; 1 iteration
for (@a,) { } # List of 1 thing; 1 iteration
for @a { } # List of @a.elems things; @a.elems iterations

The first two are equivalent because parentheses do not actually construct a
list, but only group. It is the C<< infix:<,> >> operator that forms a list.
Expand Down

0 comments on commit 3bf2eb9

Please sign in to comment.