python - Apply a series of functions to some arguments -


i'm after little more elegant this.

what elegant way implement f such that:

f(a,b,c,d,e) -> lambda args: a(b(c(d(e(*args)))))

you want reduce: maybe like:

reduce(lambda x, y: y(x), [a, b, c, d, e], initial_value) 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -