Typed Python?

Ville Vainio ville at spammers.com
Thu Jul 8 14:24:46 CEST 2004

>>>>> "Jakub" == Jakub Fast <kfast at poczta.onet.pl> writes:

    >> Currying:                     lambda x,y : f(x,y,1,2)
    Jakub> lambda x: lambda y: f(x,y,1,2)?

    Jakub> but then
    Jakub> (lambda x: lambda y: f(x,y,1,2))(3, 4)

    Jakub> won't work.

Of course it won't. It's the difference b/w taking 1 and 2 parameters.

(lambda x: lambda y: f(x,y,1,2))(3)(4)

will work.

I guess you will see that e.g in haskell

f 1 2 

does exactly this:

((f 1) 2 )

    Jakub> so much for currying?

Well, no.

Ville Vainio   http://tinyurl.com/2prnb

More information about the Python-list mailing list