Hey Hernan,
Jaime J. Febres Velez
1

You mean instead of manually defining Curry1,2,3,4 to automatically have N?.

If so, it is possible but with one condition, instead of working like ramda’s curry (the one I typed), it should always return 1-ary functions.

const add = curry((a: number, b: number: c: number) => a + b + c);
add(1)(2)(3) // ok
add(1, 2)(3) // error

It’s possible to make a curry function that works like that for any number of parameters without having to define N overloads.

Is that what you mean?

Like what you read? Give Hernan Rajchert a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.