Acme-IEnumerable

 view release on metacpan or  search on metacpan

eg/example.pl  view on Meta::CPAN

#!perl -w
use strict;
use warnings;
use v5.16;
use Acme::IEnumerable;

say join ',',
  Acme::IEnumerable
    ->range(1)
    ->take(10)
    ->reverse
    ->to_perl;

lib/Acme/IEnumerable.pm  view on Meta::CPAN


  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;

=head1 DESCRIPTION

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.

=head2 STATIC METHODS



( run in 1.103 second using v1.01-cache-2.11-cpan-483215c6ad5 )