fp::lambda - lambda calculus in Perl
use fp::lambda; # add two Church numerals together add(\&two)->(\&two); # subtract them ... subtract(\&two)->(\&two); # check if a Church numeral is zero is_zero(\&zero); # build a list of one through five my $one_through_five = cons(\&one)->(cons(\&two)->(cons(\&three)->(cons(\&four)->(cons(\&five)->(\&NIL))))); # check it's size is_equal(size($one_through_five))->(\&five); # get the sum of the list sum($one_through_five)); # returns 15 (as a Church numeral)
This module implements lambda calculus using plain Perl subroutines as lambda abstractions.
None that I am currently aware of. Of course, that does not mean that they do not exist, so if you find a bug, let me know, and I will be sure to fix it.
See the CODE COVERAGE section of fp for this information.
CODE COVERAGE
stevan little, <stevan@iinteractive.com>
Copyright 2005 by Infinity Interactive, Inc.
http://www.iinteractive.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install fp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm fp
CPAN shell
perl -MCPAN -e shell install fp
For more information on module installation, please visit the detailed CPAN module installation guide.