Author: larry Date: Tue May 29 11:14:43 2007 New Revision: 14405 Modified: doc/trunk/design/syn/S03.pod
Log: Clarification of x and xx semantics requested by chas.owens++ Modified: doc/trunk/design/syn/S03.pod ============================================================================== --- doc/trunk/design/syn/S03.pod (original) +++ doc/trunk/design/syn/S03.pod Tue May 29 11:14:43 2007 @@ -12,9 +12,9 @@ Maintainer: Larry Wall <[EMAIL PROTECTED]> Date: 8 Mar 2004 - Last Modified: 26 Apr 2007 + Last Modified: 29 May 2007 Number: 3 - Version: 114 + Version: 115 =head1 Overview @@ -545,13 +545,32 @@ infix:<x>, string replication - x + $string x $count + +Evaluates the left argument in string context, replicates the resulting +string value the number of time specified by the right argument and +returns the result as a single concatenated string regardless of context. + +If the count is less than 1, returns the null string. +The count may not be C<*> because Perl 6 does not support +infinite strings. (At least, not yet...) =item * infix:<xx>, list replication - xx + @list xx $count + +Evaluates the left argument in list context, replicates the resulting +Capture value the number of time specified by the right argument and +returns the result in a context dependent fashion. If the operator +is being evaluated in ordinary list context, the operator returns a +flattened list. In C<@@> context, the operator converts each Capture +to a separate sublist and returns the list of those sublists. + +If the count is less than 1, returns the empty list, C<()>. +If the count is C<*>, returns an infinite list (lazily, since lists +are lazy by default). =item *