Hi,
I'm reading The Craft of Functional Programming and I found something
I don't understand in page 185.
It says:
Suppose first that we want to write a curried version of a function g,
which is itself uncurried and of type (a,b) - c.
curry g
This funtion expects its arguments as a pair,
On 25 April 2011 14:11, Angel de Vicente ang...@iac.es wrote:
curry :: ((a,b) - c) - (a - b - c)
is the same as:
curry :: ((a,b) - c) - a - b - c
HTH,
Ozgur
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 25 April 2011 14:11, Angel de Vicente ang...@iac.es wrote:
curry :: ((a,b) - c) - (a - b - c)
curry g x y = g (x,y)
Is expressing curry this way more illuminating?
curry :: ((a,b) - c) - (a - b - c)
curry g = \x y - g (x,y)
That is, curry is a function taking one argument that produces a
On 25 April 2011 14:11, Angel de Vicente ang...@iac.es wrote:
OK, I have tried it and it works, but I don't understand the syntax for
curry. Until now I have encountered only functions that take the same number
of arguments as the function definition or less (partial application), but
this
Hi,
On 25/04/11 14:20, Ozgur Akgun wrote:
On 25 April 2011 14:11, Angel de Vicente ang...@iac.es
mailto:ang...@iac.es wrote:
curry :: ((a,b) - c) - (a - b - c)
is the same as:
curry :: ((a,b) - c) - a - b - c
thanks, it makes sense now. Somehow I thought that adding the
parenthesis
Hi,
On 25/04/11 14:21, Stephen Tetley wrote:
On 25 April 2011 14:11, Angel de Vicenteang...@iac.es wrote:
curry :: ((a,b) - c) - (a - b - c)
curry g x y = g (x,y)
Is expressing curry this way more illuminating?
curry :: ((a,b) - c) - (a - b - c)
curry g = \x y - g (x,y)
That is,