The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

FP::PureArray

SYNOPSIS

    use FP::PureArray;
    use FP::Div 'inc';

    is purearray(1,4,5)->map(*inc)->sum, 13;

DESCRIPTION

Perl arrays blessed into the `FP::PureArray` package, inheriting from `FP::Abstract::Pure`, and coming with the functions from `FP::Array` as methods.

If you hand someone an FP::PureArray you guarantee that you won't mutate it. This might be enforced in the future by making them immutable (todo).

TODO

Write alternative implementation that is efficient for updates on big arrays.