Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Double-curried goodness

by tmoertel (Chaplain)
on Aug 06, 2004 at 21:46 UTC ( #380738=note: print w/ replies, xml ) Need Help??


in reply to Specializing Functions with Currying

You could always take it one step further and curry the call to curry, eliminating further redundancy:
*wrap_with_tag = curry( \&curry, \&wrap_with_html ); my %handlers = ( 'none' => sub {shift}, 'bold' => wrap_with_tag('b'), 'ital' => wrap_with_tag('i'), 'para' => wrap_with_tag('p'), );

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://380738]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2016-06-30 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (392 votes). Check out past polls.