http://www.perlmonks.org?node_id=380738


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'), );