develooper Front page | perl.perl6.language | Postings from July 2008

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

From:
larry
Date:
July 26, 2008 21:04
Subject:
[svn:perl6-synopsis] r14570 - doc/trunk/design/syn
Author: larry
Date: Sat Jul 26 21:04:50 2008
New Revision: 14570

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

Log:
Allow stackable subscript declarations and (-->type)


Modified: doc/trunk/design/syn/S09.pod
==============================================================================
--- doc/trunk/design/syn/S09.pod	(original)
+++ doc/trunk/design/syn/S09.pod	Sat Jul 26 21:04:50 2008
@@ -713,6 +713,12 @@
     # Same...
     @calendar[ **{July; 1..3}; *-3..*-1]
 
+It is also possible to stack subscript declarations of various
+types, including a final normal signature to specify named args
+and return type:
+
+    my @array[10]{'a'..'z'}(:$sparse --> MyType);
+
 =head1 PDL support
 
 An array C<@array> can be tied to a PDL at declaration time:



Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About