Next | Functional Programming in Perl | 25 |
Argument acquisition is verbose in Perl
-- Haskell \x -> \_ -> x
# Perl sub { my $x = shift; sub { $x } }
This can make it painful to use higher-order functions
One wants to return some simple thing like the K function above
But the syntax makes it look worse than it is
At some point, it is not worth doing
This was a recurrent problem
Related problem: no automatic currying
-- Haskell \x _ -> x
Next | Copyright 2005 M. J. Dominus |