Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sqr(x):
- return x * x
- def double(x):
- return x + x
- def compose(f, g, x):
- return f(g(x))
- print compose(sqr, double, 3)
- # Output: 36
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement