//未柯里化
function add(a,b){
    return a + b;
}

//柯里化
function add(y){
	return function(x){
		console.log(y + "+" + x + "=");	
		return y + x;
	}
}

add(2)(1);//1+2 = 3

  

相关文章:

  • 2022-02-24
  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-22
  • 2022-12-23
  • 2022-01-03
  • 2021-09-02
  • 2022-12-23
  • 2021-06-22
相关资源
相似解决方案