Author: ruoso
Date: 2009-09-21 22:01:50 +0200 (Mon, 21 Sep 2009)
New Revision: 28342

Modified:
   docs/Perl6/Spec/S08-capture.pod
Log:
[S08] enforce correct precedence, as pointed out by pmichaud++

Modified: docs/Perl6/Spec/S08-capture.pod
===================================================================
--- docs/Perl6/Spec/S08-capture.pod     2009-09-21 19:58:46 UTC (rev 28341)
+++ docs/Perl6/Spec/S08-capture.pod     2009-09-21 20:01:50 UTC (rev 28342)
@@ -115,7 +115,7 @@
 by the operators is whatever the item inside it implements Parcel or
 Capture. For instance:
 
-  my $a = 1, (2, (3, 4));
+  my $a = (1, (2, (3, 4)));
   say $a[1];
 
 In that case, you'll get "2, (3, 4)" (or whatever is implemented in
@@ -165,14 +165,14 @@
 Captures and Parcels are seen the same way regarding
 multidimensionality, for instance:
 
-  my $a = (map { $_ * 2 }, 1..5),(map { $_ / 2 }, 1..5);
+  my $a = ((map { $_ * 2 }, 1..5),(map { $_ / 2 }, 1..5));
   say $a[0;0]; # 2
   say $a[1;0]; # 0.5
 
 The same way, if each map closure returns more than one item inside
 its capture:
 
-  my $a = (map { $_ * 2, $_ / 2 }, 1..5),(map { $_ / 2, $_ * 2 }, 1..5);
+  my $a = ((map { $_ * 2, $_ / 2 }, 1..5),(map { $_ / 2, $_ * 2 }, 1..5));
   say $a[0;0;0]; # 2
   say $a[0;0;1]; # 0.5
   say $a[1;0;0]; # 0.5

Reply via email to