Functional Programming and python
Jussi Piitulainen
jpiitula at ling.helsinki.fi
Tue Sep 24 03:06:07 EDT 2013
Vito De Tullio writes:
> rusi wrote:
>
> > [Not everything said there is correct; eg python supports currying
> > better [than haskell which is surprising considering that
> > Haskell's surname is [Curry!]
>
> AFAIK python does not support currying at all (if not via some
> decorators or something like that).
I suppose rusi means functools.partial:
>>> from functools import partial
>>> trip = lambda x,y,z: (x,y,z)
>>> partial(trip,'a','b')('c')
('a', 'b', 'c')
It also supports keyword arguments.
> Instead every function in haskell implicitly support currying...
> so... how does "no support" is better than "full support"?
Yes. I'm satisfied that Python does, but what can be seen as a
shortcoming in Haskell? Just curious.
More information about the Python-list
mailing list