ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: curry and compose -- functional language constructs
by Ben Wolfson other posts by this author
May 2 2001 5:17AM messages near this date
Re: curry and compose -- functional language constructs | Re: Surprising (for me) benchmark results...
In article <HoNH6.45055$HF.10107141@[...].com> , "Nick
Perkins" <nperkins7@[...].com>  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):
   vl=(
        lambda f: None,
        lambda f: sys.stdout.write('removed %s\n' % f)
      )
   rl=(
        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
-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
Nick Perkins
Roman Suzi
Marcin 'Qrczak' Kowalczyk
Alex Martelli
Nick Perkins
Doug Fort
Ben Wolfson

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved