[Haskell-beginners] Re: curry in a hurry
prad
prad at towardsfreedom.com
Sun Jul 4 22:14:28 EDT 2010
On Sun, 4 Jul 2010 01:17:45 +0200
Daniel Fischer <daniel.is.fischer at web.de> wrote:
> Which is somewhat incorrect. Every function takes exactly one
> argument, curried or not.
>
ya i'm beginning to see that i took the statement too much to heart.
your explanations have helped sort out several things including
thinking about what is being said instead of just accepting it.
> No, your initial thought is correct, f takes a single argument, which
> is a pair. (Well, since tuples are composed of several components, it
> is also a common way of speech to say that functions taking a tuple
> argument take several arguments. In that sense, f takes two
> arguments. But in Haskell- speak, it's more common to say a function
> fun :: a -> b -> c
> takes two arguments
>
right, but what i think i was doing was making an issue with one
vs multiple arguments when what i should probably have been doing is
examining exactly what (un)currying processes actually do.
> - of course, if c is a function type, we can also
> say that f takes three [or more] arguments.)
>
ok so this is interesting too!
f :: a -> b -> c
c :: x -> y -> z
would mean f effectively takes 5 arguments and i should be paying
attention to and understanding structures that develop from the
typedefs.
--
In friendship,
prad
... with you on your journey
Towards Freedom
http://www.towardsfreedom.com (website)
Information, Inspiration, Imagination - truly a site for soaring I's
More information about the Beginners
mailing list