NAME
Acme::Lambda - Perl with lambdas!
VERSION
Version 0.03
SYNOPSIS
Acme::Lambda brings the power of lambda to perl! It exports lambda and λ subroutines that take a code block and return it.
use Acme::Lambda;
my $square = lambda { $_ * $_ };
print $square->(4); # 16
use utf8;
my $cube = λ {$_ * $_ * $_};
print $cube->(3); # 27
# The sub can also access its full argument list through @_
my $add = lambda {$_[0] + $_[1] } ;
print $add->(3,4); # 7
EXPORT
By default, lambda and λ.
use Acme::Lambda();
to avoid exports.
AUTHOR
Nelson Elhage, <nelhage at mit.edu>
BUGS
Please report any bugs or feature requests to bug-acme-lambda at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-Lambda. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS
Structure and Interpretation of Computer Programs
LICENSE
Acme::Lambda is Copyright 2007 Best Practical Solutions, LLC. Acme::Lambda is distributed under the same terms as Perl itself.