Author: autrijus Date: Tue Apr 25 09:03:00 2006 New Revision: 8942 Modified: doc/trunk/design/syn/S02.pod doc/trunk/design/syn/S03.pod doc/trunk/design/syn/S04.pod doc/trunk/design/syn/S06.pod
Log: * S02, 03, 04, 06: Remove all occurrence of "tuple" and replace it with "Seq". A "Seq" is simply a List with no laz y parts (such as Range objects) in it: (1,2,3); # Seq Modified: doc/trunk/design/syn/S02.pod ============================================================================== --- doc/trunk/design/syn/S02.pod (original) +++ doc/trunk/design/syn/S02.pod Tue Apr 25 09:03:00 2006 @@ -12,9 +12,9 @@ Maintainer: Larry Wall <[EMAIL PROTECTED]> Date: 10 Aug 2004 - Last Modified: 24 Apr 2006 + Last Modified: 25 Apr 2006 Number: 2 - Version: 32 + Version: 33 This document summarizes Apocalypse 2, which covers small-scale lexical items and typological issues. (These Synopses also contain @@ -627,11 +627,11 @@ :(Any Num Dog|Cat $numdog) Such a signature may be used within another signature to apply -additional type constraints. When applied to a tuple argument, the +additional type constraints. When applied to a C<Capture> argument, the signature allows you to specify the types of parameters that would otherwise be untyped: - :(Any Num Dog|Cat $numdog, MySig *$a ($i,$j,$k,$mousestatus)) + :(Any Num Dog|Cat $numdog, MySig \$a ($i,$j,$k,$mousestatus)) =item * Modified: doc/trunk/design/syn/S03.pod ============================================================================== --- doc/trunk/design/syn/S03.pod (original) +++ doc/trunk/design/syn/S03.pod Tue Apr 25 09:03:00 2006 @@ -14,7 +14,7 @@ Date: 8 Mar 2004 Last Modified: 25 Apr 2006 Number: 3 - Version: 22 + Version: 23 =head1 Changes to existing operators @@ -722,7 +722,8 @@ =head1 C<zip> In order to support parallel iteration over multiple arrays, Perl 6 has -a C<zip> function that builds tuples of the elements of two or more arrays. +a C<zip> function that builds C<Seq> objects from the elements of two or more +arrays. for zip(@names; @codes) -> [$name, $zip] { print "Name: $name; Zip code: $zip\n"; Modified: doc/trunk/design/syn/S04.pod ============================================================================== --- doc/trunk/design/syn/S04.pod (original) +++ doc/trunk/design/syn/S04.pod Tue Apr 25 09:03:00 2006 @@ -12,9 +12,9 @@ Maintainer: Larry Wall <[EMAIL PROTECTED]> Date: 19 Aug 2004 - Last Modified: 21 Apr 2006 + Last Modified: 25 Apr 2006 Number: 4 - Version: 17 + Version: 18 This document summarizes Apocalypse 4, which covers the block and statement syntax of Perl. @@ -226,8 +226,8 @@ for each(@a;@b) -> $a, $b { print "[$a, $b]\n" } -or use the C<zip> function to generate a list of tuples that each can be bound -to multiple arguments enclosed in square brackets: +or use the C<zip> function to generate a list of C<Seq> objects that each can +be bound to multiple arguments enclosed in square brackets: for zip(@a;@b) -> [$a, $b] { print "[$a, $b]\n" } Modified: doc/trunk/design/syn/S06.pod ============================================================================== --- doc/trunk/design/syn/S06.pod (original) +++ doc/trunk/design/syn/S06.pod Tue Apr 25 09:03:00 2006 @@ -13,9 +13,9 @@ Maintainer: Larry Wall <[EMAIL PROTECTED]> Date: 21 Mar 2003 - Last Modified: 22 Apr 2006 + Last Modified: 25 Apr 2006 Number: 6 - Version: 30 + Version: 31 This document summarizes Apocalypse 6, which covers subroutines and the @@ -1196,7 +1196,7 @@ my ($i, $j, $k); @a ~~ rx/ <,> # match initial elem boundary - :(Int $i,Int $j,Int? $k) # match tuple with 2 or 3 ints + :(Int $i,Int $j,Int? $k) # match lists with 2 or 3 ints <,> # match final elem boundary /; say "i = $<i>"; @@ -1209,7 +1209,7 @@ Note that unlike a sub declaration, a regex-embedded signature has no associated "returns" syntactic slot, so you have to use C<< --> >> -within the signature to specify the type of the tuple, or match as +within the signature to specify the type of the signature, or match as an arglist: :(Num, Num --> Coord) @@ -1225,7 +1225,7 @@ :(\Dog()) -that is, match a null tuple of type C<Dog>. Nor is it equivalent to +that is, match a nullary function of type C<Dog>. Nor is it equivalent to :(Dog) @@ -1233,11 +1233,7 @@ :(\Any(Dog)) -or - - :([Dog]) - -and match a tuple-ish item with a single value of type Dog. +and match a function taking a single value of type Dog. Note also that bare C<\(1,2,3)> is never legal in a regex since the first paren would try to match literally.