NAME
FP::MutableArray
SYNOPSIS
use FP::MutableArray;
use FP::Div 'inc';
my $a= mutablearray(1,4,5)->map(*inc);
is $a->sum, 13;
$a->[0]++;
is $a->sum, 14;
# They can be turned into immutable ones:
my $b= $a->pure;
like( (eval { $b->[0]++; 1 } || $@), qr/XXX Hello?/);
# XXX sigh, expecting 'Modification of a read-only value attempted', but
# Test::More never fails here ???
# Although this really consumes the original array, which is now
# immutable, too:
like( (eval { $a->[0]++; 1 } || $@), qr/WHATXXX/);
is $a->sum, 14;
DESCRIPTION
Native Perl arrays but blessed so that they can follow the sequences protocol.
SEE ALSO
Implements: FP::Abstract::Sequence.
NOTE
This is alpha software! Read the package README.