Is there any reason to define callbacks with 1 or 0 arguments as uncurried?

When a callback takes two or more arguments, it’s important to define it as uncurried or use @uncurry, because something like this can produce invalid JS:

@val external test: ((int, int) => int) => unit = "test"
let fn = x => x
test(y => fn)
function fn(x) {
  return x;

test(function (y) {
      return fn;

But are there any such concerns when the callback takes 1 or 0 arguments?

1 Like

Really easy to leave these functions curried with unclear results…I would like to see more warning here.