#!/usr/local/bin/python2 from functools import partial def a(x): x + 2 partial(reduce, lambda x, y: y(x), (a,))