1 #!/usr/bin/env python 2 3 x = 1 4 x = 2 5 6 def make_add(): 7 return lambda a, b=x: a + x 8 9 def g(f, x): 10 return f(x) 11 12 add_2 = make_add() 13 result_3 = add_2(1) 14 result2_3 = g(add_2, 1) 15 16 # vim: tabstop=4 expandtab shiftwidth=4