NAME

List::Gen::Perl6 - perl6 meta operators in perl5

SYNOPSIS

many of the features found in List::Gen borrow ideas from perl6. however, since the syntax of perl5 and perl6 differ, some of the constructs in perl5 are longer/messier than in perl6. List::Gen::Perl6 is a source filter that makes some of List::Gen's features more syntactic.

when used without a following argument, reductions and triangular reductions will return a code reference that will perform the reduction on its arguments.

my $sum = [+];
say $sum->(1..10); # 55

reductions can take a list of scalars, or a single generator as their argument.

only the left hand side of the zip, cross, and hyper operators needs to be a generator. zip and cross will upgrade their rhs to a generator if it is an array. hyper will upgrade it's rhs to a generator if it is an array or a scalar.

the source filter is limited in scope, and should not harm other parts of the code, however, source filters are notoriously difficult to fully test, so take that with a grain of salt. due to limitations of Filter::Simple, hyper operators will be filtered in both code and strings. all other filters should skip strings.