Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. def pipeline(*funcs):
  2. def helper(arg):
  3. pass
  4. return helper
  5.  
  6. fun = pipeline(lambda x: x * 3, lambda x: x + 1, lambda x: x / 2)
  7. print(fun(3)) #should print 5.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement