[svn:perl6-synopsis] r13538 - doc/trunk/design/syn

2007-01-25 Thread larry
Author: larry
Date: Thu Jan 25 13:50:47 2007
New Revision: 13538

Modified:
   doc/trunk/design/syn/S03.pod
   doc/trunk/design/syn/S04.pod

Log:
Obsoleted block initializer syntax.
Mention div and mod.


Modified: doc/trunk/design/syn/S03.pod
==
--- doc/trunk/design/syn/S03.pod(original)
+++ doc/trunk/design/syn/S03.podThu Jan 25 13:50:47 2007
@@ -1985,7 +1985,7 @@
 autoincrement   ++ --
 exponentiation  **
 symbolic unary  ! + - ~ ? $ @ %  | +^ ~^ ?^ \ ^ =
-multiplicative  * / % x xx + + + ~ ~ ~ ?
+multiplicative  * / % x xx + + + ~ ~ ~ ? div mod
 additive+ - ~ +| +^ ~| ~^ ?| ?^
 junctive and (all)  
 junctive or (any)   | ^

Modified: doc/trunk/design/syn/S04.pod
==
--- doc/trunk/design/syn/S04.pod(original)
+++ doc/trunk/design/syn/S04.podThu Jan 25 13:50:47 2007
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall [EMAIL PROTECTED]
   Date: 19 Aug 2004
-  Last Modified: 22 Jan 2007
+  Last Modified: 25 Jan 2007
   Number: 4
-  Version: 47
+  Version: 48
 
 This document summarizes Apocalypse 4, which covers the block and
 statement syntax of Perl.
@@ -87,13 +87,13 @@
 
 The new Cconstant declarator introduces a lexically scoped name
 for a compile-time constant, either a variable or a 0-ary sub, which
-may be initialized with either a pseudo-assignment or a block:
+may be initialized with a pseudo-assignment:
 
 constant Num $pi = 3;
 constant Num PI { 3 }
 constant Num π  = atan(2,2) * 4;
 
-In any case the initializing value is evaluated at BEGIN time.
+The initializing expression is evaluated at BEGIN time.
 
 There is a new Cstate declarator that introduces a lexically scoped
 variable like Cmy does, but with a lifetime that persists for the


[svn:perl6-synopsis] r13539 - doc/trunk/design/syn

2007-01-25 Thread larry
Author: larry
Date: Thu Jan 25 13:54:46 2007
New Revision: 13539

Modified:
   doc/trunk/design/syn/S04.pod

Log:
(forgot to delete example line)


Modified: doc/trunk/design/syn/S04.pod
==
--- doc/trunk/design/syn/S04.pod(original)
+++ doc/trunk/design/syn/S04.podThu Jan 25 13:54:46 2007
@@ -90,7 +90,6 @@
 may be initialized with a pseudo-assignment:
 
 constant Num $pi = 3;
-constant Num PI { 3 }
 constant Num π  = atan(2,2) * 4;
 
 The initializing expression is evaluated at BEGIN time.


Map on a multislice

2007-01-25 Thread Joe Gottman
When you call map on a multislice, does it do deep or shallow 
iteration?  I can see uses for both of these:


my @multislice = ([1,2], [3,4, 5]);

my @dims = map :shallow [EMAIL PROTECTED] @multislice; # Want (2, 3)
my @changed_slice = map :deep {2 * $_ + 1} @multislice; # Want ([3, 5], 
[7, 9, 11])


Obviously both should be possible, and if we have a multislice with more 
than 2 dimensions we should be able to iterate at any level.  So what is 
the default iteration level and how do we override?


Joe Gottman

Joe Gottman