Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. def sqr(x):
  2. return x * x
  3. def double(x):
  4. return x + x
  5. def compose(f, g, x):
  6. return f(g(x))
  7. print compose(sqr, double, 3)
  8. # Output: 36
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement