Author: masak
Date: 2009-01-08 07:36:06 +0100 (Thu, 08 Jan 2009)
New Revision: 24807

Modified:
   docs/Perl6/Spec/S29-functions.pod
Log:
[S29] added slice and hash contextualizers, reordered item and list

Modified: docs/Perl6/Spec/S29-functions.pod
===================================================================
--- docs/Perl6/Spec/S29-functions.pod   2009-01-08 06:15:11 UTC (rev 24806)
+++ docs/Perl6/Spec/S29-functions.pod   2009-01-08 06:36:06 UTC (rev 24807)
@@ -1757,20 +1757,42 @@
 also knows its encoding preferences. (These are knowable in the
 lexical scope via the $?NF and $?ENC compile-time constants).)
 
+=item item
+
+ our Item multi item ( $item )
+
+Forces generic Item context on its argument, and returns it.
+
 =item list
 
  our List multi list ( *...@list )
 
 Forces List Context on it's arguments, and returns them.
 
+=item slice
 
-=item item
+ our List multi slice ( *...@list )
 
- our Item multi item ( $item )
+Forces the argument list to be evaluated in slice context.
+(Slices are considered to be potentially multidimensional in PerlĀ 6.)
+A list of C<Capture>s will be transformed into a list of lists.
+Equivalent to C<@@()> (except that empty C<@@()> means C<@@($/)>, while
+empty C<slice()> means a null slice).
 
-Forces generic Item context on its argument, and returns it.
+=item hash
 
+The C<hash> contextualizer
 
+ our Hash multi hash ( *...@list )
+
+Forces the argument list to be evaluated in hash context.
+The expression is evaluated in list context (flattening any C<Capture>s),
+then a hash will be created from the list, taken as a list of C<Pair>s.
+(Any element in the list that is not a C<Pair> will pretend to be a key
+and grab the next value in the list as its value.)  Equivalent to
+C<%()> (except that empty C<%()> means C<%($/)>, while
+empty C<hash()> means an empty hash).
+
 =item :16, :8, :2, :10
 
  our Num multi prefix:<:16> ( Str $hexstr )

Reply via email to