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 result function taking two arguments. In Haskell - the type signature: > curry :: ((a,b) -> c) -> (a -> b -> c) ... can mean either form. Though this is a "quirk" of Haskell, in the language Clean, for example, the parens in the type signature "mean what they" say so only only my second definition is allowed, the first version won't compile. Best wishes Stephen _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe