#!/usr/local/bin/python2 from functools import partial def a(x): return x + 2 def b(x): return x * 3 def c(x): return x - 4 p = partial(reduce, lambda x, y: y(x), (a, b, c)) print p(1)