Sha256: 1b8b3f21926cc71072b241d2c2d5c02e8ef9a5f228019fe91f88227985d2a34f

Contents?: true

Size: 341 Bytes

Versions: 7

Compression:

Stored size: 341 Bytes

Contents

define(['../array/slice'], function (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)));
        };
    }

    return 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/src/function/partial.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/mout/src/function/partial.js
entangled-0.0.14 spec/dummy/public/node_modules/bower/node_modules/mout/src/function/partial.js
entangled-0.0.13 spec/dummy/public/node_modules/bower/node_modules/mout/src/function/partial.js
entangled-0.0.12 spec/dummy/public/node_modules/bower/node_modules/mout/src/function/partial.js
entangled-0.0.11 spec/dummy/public/node_modules/bower/node_modules/mout/src/function/partial.js
entangled-0.0.10 spec/dummy/public/node_modules/bower/node_modules/mout/src/function/partial.js