Acme::IEnumerable - Proof-of-concept lazy lists, iterators, generators
use v5.16; use Acme::IEnumerable; my @sorted = Acme::IEnumerable ->from_list(qw/3 2 1/) ->where(sub { $_ < 3 }) ->order_by(sub { $_ }) ->to_perl; say join ' ', @sorted;
Experimental implementation of a iterator/generator protocol and lazy lists on top of it, with plenty of generic methods inspired by .NET's IEnumerable interface and corresponding facilities in Ruby, Python, and Haskell. Mainly for discussion purposes.
Creates new Acme::IEnumerable::List from the supplied list.
Acme::IEnumerable::List
Creates a new Acme::IEnumerable with $count integers from $from.
Acme::IEnumerable
Creates new Acme::IEnumerable containing the first $count elements of the base enumerable.
...
Nothing.
Copyright (c) 2013 Bjoern Hoehrmann <bjoern@hoehrmann.de>. This module is licensed under the same terms as Perl itself.
To install Acme::IEnumerable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::IEnumerable
CPAN shell
perl -MCPAN -e shell install Acme::IEnumerable
For more information on module installation, please visit the detailed CPAN module installation guide.