Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^2: Specializing Functions with Currying

by FoxtrotUniform (Prior)
on Aug 06, 2004 at 22:18 UTC ( #380752=note: print w/replies, xml ) Need Help??

in reply to Re: Specializing Functions with Currying
in thread Specializing Functions with Currying

Fair enough. It's not the case that currying is equivalent to making a closure, though (currying is more specific), but that's a minor point. The idea here is to describe a way to avoid the parameter-handling that comes with general-purpose functions, with as little lookup fuss as possible.

More generally, I'm turning into a functional-programming evangelist, and since Perl makes it easy to use a lot of my favourite techniques I'm writing about them here. Go up a meta-level from my OP, and what I'm talking about is building functions on an ad-hoc basis (compare to the static "functions are global named objects and part of the design document" world of straight procedural programming). Whether you use literal subs or build higher order functions to do it is less important than being aware of the possibility.

F o x t r o t U n i f o r m
Found a typo in this node? /msg me
% man 3 strfry

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://380752]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2018-03-22 04:56 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (272 votes). Check out past polls.