Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Near-free function currying in Perl

by BrowserUk (Pope)
on Nov 17, 2004 at 05:42 UTC ( #408321=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $app_server = AppServer->new(
            logger => curry( \&log_to_handle, *STDERR, "app-server" ),
            ...
    );
    
  2. or download this
    $app_server = AppServer->new(
        logger => sub { log_to_handle( *STDERR, "app-server", @_ ) },
        ...
    );
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2020-12-03 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (52 votes). Check out past polls.

    Notices?