本間 雅洋 (Masahiro Honma)
and 1 contributors

NAME

Data::Monad::Identity - The identity monad.

SYNOPSIS

  use Data::Monad::Identity;

  my $m = Data::Monad::Identity->new(3, 5)->map(sub { $_[0] + $_[1] });
  print $m->value, "\n";  # 8

DESCRIPTION

Data::Monad::Identity doesn't nothing. It just wraps values.

METHODS

$m = Data::Monad::Identity->new(@v);

Makes the new value which represents @v.

unit
flat_map

Overrides methods of Data::Monad::Base::Monad.

@v = $m->value;

Retrieves wrapped values from this object.

AUTHOR

hiratara <hiratara {at} cpan.org>

SEE ALSO

Data::Monad::Base::Monad

LICENSE

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