Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. maybe = ->
  2. fns = []
  3. monad = (input) -> fns.reduce ((v, fn) -> fn v), input
  4. Object.assign monad, with: (fn) ->
  5. fns.push (v) -> if v? then fn v else null
  6. monad
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement