f(a, b, c)처럼 단일 호출로 처리하는 함수를
f(a)(b)(c)와 같이 각각의 인수가 호출 가능한 프로세스로 호출된 후 병합될 수 있게 변환하는 것.
커링은 함수를 호출하는 것이 아닌 변환하는 것이다!!
const sum = (a, b) => a + b;
console.log(sum(1, 2));
const curryingSum = (a) => (b) => a + b;
console.log(curryingSum(1)(2));
console.log(curryingSum(1));

매개변수를 부족하게 호출하면 필요한 매개변수를 console에서 알려줌.
const makeFood = (ingredient1) => {
return (ingredient2) => {
return (ingredient3) => {
return `${ingredient1} ${ingredient2} ${ingredient3}`;
};
};
};
const hambuger = makeFood("bread")("ham")("ketchup");
console.log(hambuger);
const cleanerMakeFood = (ingredient1) => (ingredient2) => (ingredient3) =>
`${ingredient1} ${ingredient2} ${ingredient3}`;
const newHambuger = cleanerMakeFood("bread")("ham")("ketchup");
파라미터가 몇개가 되든 맞춰서 해줌
