Skip to content

Commit 33b0434

Browse files
authored
say what parentheses do
1 parent 62d85d0 commit 33b0434

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/Language/list.rakudoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ elegant system for handling them.
1313
=head1 Literal lists
1414

1515
Literal L<C<List>|/type/List>s are created with commas and semicolons, B<not>
16-
with parentheses, so:
16+
with parentheses (which only group things), so:
1717

1818
1, 2; # This is two-element list
1919
our $list = (1, 2); # This is also a List, in parentheses
@@ -96,7 +96,7 @@ instead.
9696
One of the ways C<@>-sigiled variables act like lists is by always supporting
9797
L<positional subscripting|/language/subscripts>. Anything bound to an
9898
C<@>-sigiled value must support the L<C<Positional>|/type/Positional> role which
99-
guarantees that this is going to fail:
99+
guarantees that the following is going to fail:
100100

101101
my @a := 1; # Type check failed in binding; expected Positional but got Int
102102

@@ -166,7 +166,7 @@ would expect>.
166166

167167
This rule is equivalent to saying that arguments to iterators will not
168168
flatten, will not de-containerize, and will behave as if a single argument
169-
has been handled to them, whatever the shape that argument has.
169+
has been handed to them, whatever the shape that argument has.
170170

171171
=for code
172172
my @a = 1,2; .say for @a, |@a; # OUTPUT: «[1 2]␤1␤2␤»
@@ -175,7 +175,7 @@ my @a = 1,2; .say for $[@a, |@a ]; # OUTPUT: «[[1 2] 1 2]␤»
175175
In the second case, the single argument is a single element, since we have
176176
itemized the array. There's an exception to the single argument rule
177177
L<mentioned in the Synopsis|https://github.com/Raku/old-design-docs/blob/master/S07-lists.pod#The_single_argument_rule>:
178-
list or arrays with a single element will be flattened:
178+
lists or arrays with a single element will be flattened:
179179

180180
=for code
181181
my @a = 1,2; .say for [[@a ]]; # OUTPUT: «1␤2␤»

0 commit comments

Comments
 (0)