Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
good description of currying - it took me ages to understand this concept (through studies of Scheme, Lisp and Haskell over the years), and it didnt finally twig until I was having to extend some legacy C code here - at one point in the code I knew I would eventually call a key function, but I didn't have all the information in scope right then. I remember thinking 'if only I could have a new function that called that one, using the arguments I have now, and the arguments the new function _will_ have in scope when it gets invoked - I could just pass a function pointer to that new function, instead of chaining all these parameters together and passing long parameter lists around...hey!!'

another good name is 'partial application of functions' - your calling it with a partial list of parameters...

any idea how you would do multiple application of these attributes - e.g. bold _and_ italic

use brain;


In reply to Re: Specializing Functions with Currying by leriksen
in thread Specializing Functions with Currying by FoxtrotUniform

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (1)
As of 2024-04-18 23:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found