curry and compose -- functional language constructs

Ben Wolfson wolfson at
Wed May 2 09:17:33 CEST 2001

In article <HoNH6.45055$HF.10107141 at>, "Nick
Perkins" <nperkins7 at> wrote:

> I think these are really cool, but i have never seen anyone use curry or
> compose.  Why not?  Shouldn't everyone use these all the time?

I used a compose() once:

def action_maker(v,r):
        lambda f: None,
        lambda f: sys.stdout.write('removed %s\n' % f)
        lambda f: f,
        lambda f: (os.remove(f),f)[1]
   return compose(vl[v],rl[r])
> Does anyone have any other neat Python solutions that provide
> 'functional-style' features?

There are several memoization modules floating around.

Barnabas T. Rumjuggler
"Et tu, Brute?" sedulous.
 -- barry in indy, in apihna

More information about the Python-list mailing list