[Haskell-beginners] A post about Currying and Partial application
Rustom Mody
rustompmody at gmail.com
Sun Oct 2 16:13:05 CEST 2011
On Sun, Oct 2, 2011 at 9:00 AM, Felipe Almeida Lessa <felipe.lessa at gmail.com
> wrote:
> On Sun, Oct 2, 2011 at 12:04 AM, Rustom Mody <rustompmody at gmail.com>
> wrote:
> > How would you classify a function of type (Int, Int) -> Int -> Int ?
>
> It's curried. Uncurried would be:
>
> ((Int, Int), Int) -> Int
>
Yes, if you mean that uncurrying it gives the type ((Int, Int), Int) -> Int
But it can also be curried to get the type Int -> Int -> Int -> Int
Does that not make it uncurried as well?
> > Likewise if we have a polymorphic foo: Int -> a and we instantiate a to
> Int
> > -> Int does foo suddenly get curried?
>
> Int -> a is both curried and uncurried. Int -> Int -> Int is just curried.
>
> --
> Felipe.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20111002/ff169572/attachment.htm>
More information about the Beginners
mailing list