Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const pipe = (...funs) => value => funs.reduce((val, fun) => fun(val), value);
- function curry(func) {
- return function nest(...args) {
- if (args.length >= func.length) {
- return func(...args);
- }
- return (...nextArgs) => nest(...args, ...nextArgs);
- }
- }
Add Comment
Please, Sign In to add comment