Author: lwall
Date: 2010-02-01 21:14:16 +0100 (Mon, 01 Feb 2010)
New Revision: 29604
Modified:
docs/Perl6/Spec/S02-bits.pod
docs/Perl6/Spec/S06-routines.pod
Log:
[S02,S06] continue de-confusing flat and eager
Modified: docs/Perl6/Spec/S02-bits.pod
===================================================================
--- docs/Perl6/Spec/S02-bits.pod 2010-01-31 22:21:10 UTC (rev 29603)
+++ docs/Perl6/Spec/S02-bits.pod 2010-02-01 20:14:16 UTC (rev 29604)
@@ -13,8 +13,8 @@
Created: 10 Aug 2004
- Last Modified: 30 Jan 2009
- Version: 197
+ Last Modified: 1 Feb 2009
+ Version: 198
This document summarizes Apocalypse 2, which covers small-scale
lexical items and typological issues. (These Synopses also contain
@@ -3993,8 +3993,9 @@
=item *
-To force non-lazy list flattening, use the C<eager> list operator.
-List assignment is also implicitly eager.
+To force non-lazy list processing, use the C<eager> list operator.
+List assignment is also implicitly eager. (Actually, when we say
+"eager" we usually mean "mostly eager" as defined in L<S07>).
eager $filehandle.lines; # read all remaining lines
@@ -4008,6 +4009,9 @@
and calls the iterator as it needs more elements. (Counting the elements
in the array will also force eager completion.)
+This operator is agnostic towards flattening or slicing. In merely changes
+the work-ahead policy for the value generator.
+
=item *
A variant of C<eager> is the C<hyper> list operator, which declares
@@ -4020,6 +4024,9 @@
as the results come in, such that some keys can be seen even before
the hyper is done. Thinking about Map-Reduce algorithms here...)
+This operator is agnostic towards flattening or slicing. It merely changes
+the work-ahead policy for the value generator.
+
=item *
Signatures on non-multi subs can be checked at compile time, whereas
Modified: docs/Perl6/Spec/S06-routines.pod
===================================================================
--- docs/Perl6/Spec/S06-routines.pod 2010-01-31 22:21:10 UTC (rev 29603)
+++ docs/Perl6/Spec/S06-routines.pod 2010-02-01 20:14:16 UTC (rev 29604)
@@ -16,8 +16,8 @@
Created: 21 Mar 2003
- Last Modified: 19 Nov 2009
- Version: 125
+ Last Modified: 1 Feb 2010
+ Version: 126
This document summarizes Apocalypse 6, which covers subroutines and the
new type system.
@@ -970,10 +970,11 @@
The C<|> operator flattens lazily -- the array is flattened only if
flattening is actually required within the subroutine. To flatten before
-the list is even passed into the subroutine, use the C<eager> list
+the list is even passed into the subroutine, use the C<flat> list
operator:
- foo(|eager @onetothree); # array flattened before &foo called
+ foo(|flat 1,2,3 Z 4,5,6); # zip list flattened before interpolation
+ foo |(1,2,3 Z 4,5,6).flat # same thing
=head2 Multidimensional argument list binding