Feeling kind of stupid here. Trying the new uncurried mode. I don’t understand why the first one works below but the second generates a compile error. When I look at the intellisense on the callback types, they look identical. Type both expect an 'a=>unit
. I can fix the broken one by changing it to Js.log(_)
but this is a hassle to do everywhere. For example, I often pass Belt.Int.toString
as a callback and don’t want to have to change it everywhere to Belt.Int.toString(_)
. How can I make it so I can use Belt.Int.toString
everywhere like I could before uncurried mode?
let m = xs => xs->Belt.Array.forEach(Js.log) // works
let n = xs => xs->Seq.forEach(Js.log) // fails