Guest User

Untitled

a guest
Feb 18th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. const pipe = (...funs) => value => funs.reduce((val, fun) => fun(val), value);
  2. function curry(func) {
  3. return function nest(...args) {
  4. if (args.length >= func.length) {
  5. return func(...args);
  6. }
  7. return (...nextArgs) => nest(...args, ...nextArgs);
  8. }
  9. }
Add Comment
Please, Sign In to add comment