Sha256: ee37122ea5fca942588f7d0ca093af61ddba35fbbb419cb7590dd89ccb8f36ff

Contents?: true

Size: 341 Bytes

Versions: 7

Compression:

Stored size: 341 Bytes

Contents

var slice = require('../array/slice');

    /**
     * Creates a partially applied function.
     */
    function partial(fn, var_args){
        var argsArr = slice(arguments, 1); //curried args
        return function(){
            return fn.apply(this, argsArr.concat(slice(arguments)));
        };
    }

    module.exports = partial;


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/mout/function/partial.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/mout/function/partial.js
entangled-0.0.14 spec/dummy/public/node_modules/bower/node_modules/mout/function/partial.js
entangled-0.0.13 spec/dummy/public/node_modules/bower/node_modules/mout/function/partial.js
entangled-0.0.12 spec/dummy/public/node_modules/bower/node_modules/mout/function/partial.js
entangled-0.0.11 spec/dummy/public/node_modules/bower/node_modules/mout/function/partial.js
entangled-0.0.10 spec/dummy/public/node_modules/bower/node_modules/mout/function/partial.js