[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

It's not currying!

This page is part of the web mail archives of SRFI 26 from before July 7th, 2015. The new archives for SRFI 26 contain all messages, not just those from before July 7th, 2015.

Hello list,

I have a very simple problem with this SRFI:
the name is wrong. What is described is
not currying (that much is admitted in
the draft itself!)

Currying would be something like this:

(define (curry2 proc)
  (lambda (x)
    (lambda (y)
      (proc x y))))

(((curry2 +) 12) 13)
==> 25

What *is* described is partial application.
Now it so happens that if
1. multiple-argument functions are really
   curried, single-argument functions, and
2. all evaluation is lazy,
then there is no semantic difference between
partial application on the first argument and
full application. So one gets partial application
"for free". As is the case in the H*sk*ll language.
Nevertheless, even in Haskell this wouldn't be
called currying.

So please don't call this operation currying.