const add = x => y => x+y;
const add10 = add(10);
console.log(add10(20));
console.log(add(10)(20));
결과값 : 30 30
이게 어떤식으로 되는지 잘 모르겠씁니다 .ㅜ
합성함수는 알겠는데 커링은 책을봐도 잘 모르겠어요.....ㅠㅠ
const add = x => y => x+y;
const add10 = add(10);
console.log(add10(20));
console.log(add(10)(20));
결과값 : 30 30
이게 어떤식으로 되는지 잘 모르겠씁니다 .ㅜ
합성함수는 알겠는데 커링은 책을봐도 잘 모르겠어요.....ㅠㅠ
인자 1개만 가지는 함수로 만드는 방법
add(x)(y)라고 생각하면 편하다 add10(y)=add(10)(y)고