NAME

FP::Combinators2 - more function combinators

SYNOPSIS

use FP::Combinators2 ":all";
use FP::Array qw(array); use FP::Equal ":all";

my $ra = right_associate_(\&array, 0);
is_equal $ra->(qw(a b c d)),
         ['a', ['b', ['c', 'd']]];
is_equal $ra->(qw(a b)), ['a', 'b'];
is_equal $ra->(qw(a)), 'a';
is_equal $ra->(), 0;

my $la = left_associate_(\&array, 0);
is_equal $la->(qw(a b c d)),
         [[['a', 'b'], 'c'], 'd'];
is_equal $la->(qw(a b)), ['a', 'b'];
is_equal $la->(qw(a)), 'a';
is_equal $la->(), 0;

DESCRIPTION

This is an extension of FP::Combinators for functions that need more dependencies and can't be put into the former because of circular dependencies.

SEE ALSO

FP::Combinators

NOTE

This is alpha software! Read the status section in the package README or on the website.