3 var callable = require('../../object/valid-callable')
4 , aFrom = require('../../array/from')
6 , apply = Function.prototype.apply, call = Function.prototype.call
7 , callFn = function (arg, fn) { return call.call(fn, this, arg); };
9 module.exports = function (fn/*, …fnn*/) {
11 if (!fn) callable(fn);
12 fns = [this].concat(aFrom(arguments));
13 fns.forEach(callable);
17 return function (arg) {
18 return fns.reduce(callFn, apply.call(first, this, arguments));