Hi,
On 25/04/11 14:21, Stephen Tetley wrote:
On 25 April 2011 14:11, Angel de Vicente 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, curr
Hi,
On 25/04/11 14:20, Ozgur Akgun wrote:
On 25 April 2011 14:11, Angel de Vicente 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 in ...
On 25 April 2011 14:11, Angel de Vicente 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 syntax looks
On 25 April 2011 14:11, Angel de Vicente 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
res
On 25 April 2011 14:11, Angel de Vicente 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
http://www.haskell.org/mailman/listinfo/
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 pa