Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Double-curried goodness

by tmoertel (Chaplain)
on Aug 06, 2004 at 21:46 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://380738]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-19 16:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found