Guest User

Untitled

a guest
Nov 24th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. f = chain(function $f(it) { return `a:${it}` })
  2. g = chain(function $g(it) { return `b:${it}` })
  3.  
  4. fg1 = chain(f)(g) // this works as expected
  5. fg2 = chain(chain(f)(g)) // this gives a bound wrapper
  6. fg3 = chain(fg1) // this gives undefined.
  7.  
  8. // the outputs are generated by running fg('c')
Add Comment
Please, Sign In to add comment