Fixes to fold functions and tests in Lambda.pm