Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[S02] Clarified quotewords being bound to parameters
The sentence on how a quoteword is flattened or sliced when bound to a
parameter is a bit clearer now.
  • Loading branch information
ShimmerFairy committed May 22, 2013
1 parent 2d423f2 commit 465ec29
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions S02-bits.pod
Expand Up @@ -3533,12 +3533,12 @@ and ends up storing a C<Capture> object (which weeds out any named
arguments into a separate structure, in contrast to a C<Parcel>, which keeps
everything in its original list).

Binding is different from assignment. If bound to a signature, the
C<< <a b> >> parcel will be promoted to a C<Capture> object, but if
bound to a parameter, it will make the flattening/slicing decision
based on the nature of the individual parameter. That is, if you
pass C<< <a b> >> as an argument, it will bind as a single positional
or slice item, but two slurpy items.
Binding is different from assignment. If bound to a signature, the C<< <a b> >>
parcel will be promoted to a C<Capture> object, but if bound to a parameter, it
will make the flattening/slicing decision based on the nature of the individual
parameter. That is, if you pass C<< <a b> >> as an argument, it will bind as a
single item to a positional or slice parameter, and as two items to a slurpy
parameter.

But note that under the parenthesis-rewrite rule, a single value will
still act like a single value. These are all the same:
Expand Down

0 comments on commit 465ec29

Please sign in to comment.