=head1 TITLE
Semi-finite (lazy) lists
=head1 VERSION
Maintainer: Damian Conway <[EMAIL PROTECTED]>
Date: 4 August 2000
Version: 1.00
Mailing List: [EMAIL PROTECTED]
Number: 24
=head1 ABSTRACT
This RFC proposes that the right operand of a C<..> operator
may be omitted in a list context, producing a lazily evaluated
semi-finite list. It is further proposed that operations on
such lists also be carried out lazily.
=head1 DESCRIPTION
It is proposed that the right operand of a list context range operation
be made optional. If omitted, the resulting range would become semi-infinite:
for (1..) {
print "The next number is: $_\n";
}
@odds = grep { $_%2 } (1..);
switch ($n) {
case [32..] { print "Two many characters in filename" }
case (@odds) { print "That's odd!" }
}
Note that the values in @odds would also be lazily generated
(otherwise the C<grep> would never finish).
=head1 IMPLEMENTATION
Ask MJD.
=head1 SEE ALSO
RFC proposing a co-routine mechanism
=head1 REFERENCES
The thoughts and writings of Mark-Jason Dominus.