Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Near-free function currying in Perl

by herveus (Prior)
on Nov 17, 2004 at 15:18 UTC ( [id://408436]=note: print w/replies, xml ) Need Help??


in reply to Re: Near-free function currying in Perl
in thread Near-free function currying in Perl

Howdy!

greeting('Hello', 'Good Looking'); # prints immediately greeting('Woah'); # Waits ... greeting('Nelly'); # prints now that it has both arguments

I don't think so. greeting('Woah') would, as far as I can tell, yield a new function that takes a single argument, so it would have to be used in a context where that other argument will appear.

I'd expect it to be analagous to greeting('Whoa')->('Nelly');

yours,
Michael
  • Comment on Re^2: Near-free function currying in Perl

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-24 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found