Acme::Lambda - Perl with lambdas!
Version 0.03
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
By default, lambda and λ.
use Acme::Lambda(); to avoid exports.
use Acme::Lambda();
Nelson Elhage, <nelhage at mit.edu>
<nelhage at mit.edu>
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.
bug-acme-lambda at rt.cpan.org
Structure and Interpretation of Computer Programs
Acme::Lambda is Copyright 2007 Best Practical Solutions, LLC. Acme::Lambda is distributed under the same terms as Perl itself.
To install Acme::Lambda, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::Lambda
CPAN shell
perl -MCPAN -e shell install Acme::Lambda
For more information on module installation, please visit the detailed CPAN module installation guide.