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.
CODE COVERAGE section of fp for this information.
stevan little, <email@example.com>
Copyright 2005 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.