technical-summary/src/algorithm-question/compose at master · chenqf/technical-summary · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

let compose = function (func) {
    return function (arg) {
        return func.reduceRight(function (composed, fn) {
            return fn(composed);
        }, arg)
    }
};