Just a curious question. I'm trying to detect if a function is multiple currlies during the runtime; eg I want to make following statements both work
add(1, 2, 3); // 6
add(1)(2)(3); // 6
add(1, 2)(3); // 6
add(1)(2, 3); // 6
First I need solve is to detect if the function is processing a multi curlied arguments or not. Here is my testing cases.
isMultipleCurly()(); // true
isMultipleCurly()()(); // true
isMultipleCurly(); // false
so how can I check if function is processing multiple curlied arguments?