function composition python code example Example: function composition python def compose2(f, g): return lambda x: f(g(x))