Author: lwall Date: 2010-02-10 18:10:26 +0100 (Wed, 10 Feb 2010) New Revision: 29675
Modified: docs/Perl6/Spec/S03-operators.pod docs/Perl6/Spec/S09-data.pod docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [Spec] squash [;] fossils noticed by eternaleye++ Modified: docs/Perl6/Spec/S03-operators.pod =================================================================== --- docs/Perl6/Spec/S03-operators.pod 2010-02-10 11:20:25 UTC (rev 29674) +++ docs/Perl6/Spec/S03-operators.pod 2010-02-10 17:10:26 UTC (rev 29675) @@ -15,8 +15,8 @@ Created: 8 Mar 2004 - Last Modified: 5 Feb 2010 - Version: 190 + Last Modified: 10 Feb 2010 + Version: 191 =head1 Overview @@ -4149,10 +4149,6 @@ [1,2,3] # make new Array: 1,2,3 [,] 1,2,3 # same thing -You may also reduce using the semicolon second-dimension separator: - - [[;] 1,2,3] # equivalent to [1;2;3] - Builtin reduce operators return the following identity values: [**]() # 1 (arguably nonsensical) @@ -4733,13 +4729,6 @@ ... } -To read arrays serially rather than in parallel, use C<list(@x;@y)>. -This wins a "useless use of list award" in this case since you could -always just write C<(@x,@y)> to mean the same thing. But sometimes -it's nice to be explicit about that: - - @foo := [[1,2,3],[4,5,6]]; say list([;] @foo); # 1,2,3,4,5,6 - =head1 Minimal whitespace DWIMmery Whitespace is no longer allowed before the opening bracket of an array Modified: docs/Perl6/Spec/S09-data.pod =================================================================== --- docs/Perl6/Spec/S09-data.pod 2010-02-10 11:20:25 UTC (rev 29674) +++ docs/Perl6/Spec/S09-data.pod 2010-02-10 17:10:26 UTC (rev 29675) @@ -13,8 +13,8 @@ Created: 13 Sep 2004 - Last Modified: 9 Feb 2010 - Version: 39 + Last Modified: 10 Feb 2010 + Version: 40 =head1 Overview @@ -842,10 +842,19 @@ @nums[0;1;2] -instead, then you need to use the C<[;]> reduction operator: +it is not good enough to use the C<|> prefix operator, because +that interpolates at the comma level, so: - @nums[[;] 0..2] + @nums[ |(0,1,2) ] +just means + + @nums[ 0,1,2 ]; + +Instead, to interpolate at the semicolon level, you need to use the C<||> prefix operator: + + @nums[ ||(0..2) ] + The zero-dimensional slice: @x[] Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Containers.pod 2010-02-10 11:20:25 UTC (rev 29674) +++ docs/Perl6/Spec/S32-setting-library/Containers.pod 2010-02-10 17:10:26 UTC (rev 29675) @@ -19,8 +19,8 @@ Created: 19 Feb 2009 extracted from S29-functions.pod - Last Modified: 2 Feb 2010 - Version: 15 + Last Modified: 10 Feb 2010 + Version: 16 The document is a draft. @@ -61,10 +61,13 @@ Typically, you could just write C<(@a,@b,@c)>, but sometimes it's nice to be explicit about that: - @foo := [[1,2,3],[4,5,6]]; say cat([;] @foo); # 1,2,3,4,5,6 + @foo := [[1,2,3],[4,5,6]]; say cat(||@foo); # 1,2,3,4,5,6 In addition, a C<Cat> in item context emulates the C<Str> interface lazily. +[Conjecture: Cats should maybe just do the lazy strings, and leave flattening +to other operators.] + =item roundrobin our Parcel multi roundrobin( *...@list )