Skip to content

Commit

Permalink
[Spec] squash [;] fossils noticed by eternaleye++
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@29675 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
lwall committed Feb 10, 2010
1 parent 76949de commit f4646ad
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
15 changes: 2 additions & 13 deletions S03-operators.pod
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Synopsis 3: Perl 6 Operators

Created: 8 Mar 2004

Last Modified: 5 Feb 2010
Version: 190
Last Modified: 10 Feb 2010
Version: 191

=head1 Overview

Expand Down Expand Up @@ -4149,10 +4149,6 @@ the list operator form of the C<< circumfix:<[ ]> >> anonymous array composer:
[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)
Expand Down Expand Up @@ -4733,13 +4729,6 @@ you just wish to skip missing entries, use C<roundrobin> instead:
...
}

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
Expand Down
17 changes: 13 additions & 4 deletions S09-data.pod
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Synopsis 9: Data Structures

Created: 13 Sep 2004

Last Modified: 9 Feb 2010
Version: 39
Last Modified: 10 Feb 2010
Version: 40

=head1 Overview

Expand Down Expand Up @@ -842,9 +842,18 @@ If you wanted that C<0..2> range to mean

@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:

Expand Down
9 changes: 6 additions & 3 deletions S32-setting-library/Containers.pod
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ DRAFT: Synopsis 32: Setting Library - Containers.pod

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.

Expand Down Expand Up @@ -61,10 +61,13 @@ like so:
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 )
Expand Down

0 comments on commit f4646ad

Please sign in to comment.