curry.js 267 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 var slice = require('./slice') module.exports = function curry(fn /* arg1, arg2, ... argN */) { var curryArgs = slice(arguments, 1) return function curried() { var invocationArgs = slice(arguments) return fn.apply(this, curryArgs.concat(invocationArgs)) } }