柯里化: 函数的多参变单参
//多参:
function mul(a, b, c){
return a * b * c
}
var mul1 = mul(1,2,3)
function mul(a){
return function(b){
return function (c){
return a * b * c
}
}
}
var fn = mul(1)
fn(2, 3)
fn(1,2)
柯里化: 函数的多参变单参
//多参:
function mul(a, b, c){
return a * b * c
}
var mul1 = mul(1,2,3)
function mul(a){
return function(b){
return function (c){
return a * b * c
}
}
}
var fn = mul(1)
fn(2, 3)
fn(1,2)