On 5 Sep 2009, at 15:47 , Gerald Britton wrote:Yeah but you could leverage Python's *args to get a compositor of more than two functions e.g.
Ah -- so not a real function then (yet)? Though something we could
borrow from Haskell, I suppose, even though:
compose(foo,bar) == lambda x: foo(bar(x))
no?
def compose(*funcs):
return reduce(lambda f1, f2:
lambda *args, **kwargs:
f1(f2(*args, **kwargs)),
funcs)
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas