[Haskell-cafe] Newbie terminology for partial application

Derek Elkins derek.a.elkins at gmail.com
Mon Aug 27 12:39:59 EDT 2007


On Mon, 2007-08-27 at 16:29 +0200, Peter Verswyvelen wrote:
> A while ago I confused "currying" with "partial application", which was 
> pointed out by members of this community, and the wiki pages got adapted 
> so that newbies like me don't make the same mistake twice ;) That's great.
> 
> Anyway, at the risk of making mistakes again, I'm looking for good 
> terminilogy when talking about "partial application".
> 
> For example:
> 
> -- uncurried form
> *f (x,y)*  = -- whatever
> 
> -- curried form
> *g x y *= f (x,y)
> 
> -- partial application
> *h x *= g x
> 
> But when writing text documents, I guess it is common to say "/g is 
> curried/", but is it also common to say /"g is partially applied"? /The 
> latter sounds silly to a non-native speaker like myself... Or shouldn't 
> it be?

g -is- curried, just period, i.e. that is a property of g itself.  g is
partially applied to x in h or (g x) is a partial application, i.e. this
is a property of a particular application.  g is applied to x would also
be fine since there is rarely much value in making a distinction between
application and partial application at the level of programming (in
Haskell at least).  You do seem to have a good grasp on the terminology.

> /And what is "application"? I guess it means that (g x y) is internally 
> translated to ((g $ x) $ y) which is translated into (apply (apply g x) 
> y) where apply is a primitive function?

Yes, application is what you do when you "call" a function with
arguments.  The side step through ($) is unnecessary, ($) is nothing
special.



More information about the Haskell-Cafe mailing list