
Data::Monad::List - The List monad.

use Data::Monad::List;
my $m = scalar_list(10, 20);
$m = $m->flat_map(sub {
my $v = shift;
scalar_list($v + 1, $v + 2);
});
my @result = $m->scalars; # (11, 12, 21, 22)

Data::Monad::List represents non-deterministic values.
This module is marked EXPERIMENTAL. API could be changed without any notice.

Is the same as following lines.
$list = Data::Monad::List->new([$single_values[0]], [$single_values[1]], ...)
These are shorthand of methods which has the same name.
The constructor of this class.
Overrides methods of Data::Monad::Base::MonadZero.
Overrides methods of Data::Monad::Base::Monad.
Retrieves list of values from $list
Retrieves values which was set by the scalar_list method.

hiratara <hiratara {at} cpan.org>


This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.