Why doesn't this simple Curry-like implemention work?
J.Jacob
joost_jacob at hotmail.com
Sun Oct 28 07:04:29 EST 2001
More information about the Python-list mailing list
Sun Oct 28 07:04:29 EST 2001
- Previous message (by thread): Why doesn't this simple Curry-like implemention work?
- Next message (by thread): Why doesn't this simple Curry-like implemention work?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Michael R. Head" <burner at core.binghamton.edu> wrote in message news:<mailman.1004250686.9471.python-list at python.org>... > # for some reason this function doesn't work in python 1.5.2. > def curry(f, p): > return lambda x: apply(f, p, x) > I'm supposing that lamda isn't storing > the reference to its inputs -- which it seems it should -- is this > correct? > mike Try this: def curry(f, p): return lambda x, ff=f, pp=p: apply(ff, pp, x) But i wonder if it does what you want <wink> Joost
- Previous message (by thread): Why doesn't this simple Curry-like implemention work?
- Next message (by thread): Why doesn't this simple Curry-like implemention work?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list