柯里化

var scope = "test";
function currying(welcome){
    return function(name) {
        return welcome + "," + name;
    }
}
var prefix = currying("hello");
prefix("world");
原文地址:https://www.cnblogs.com/jpit/p/7405319.html