You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letoptionFn= Some (fun x y -> x + y)letlist= List.choose id [optionFn]
printfn "List length: %d"(List.length list)
printfn "Answer %d"(List.head list 34)// Expect 7 but get 0
Thanks a lot for the code to reproduce @stkb! Yes, the fact that Fable erases option creates some trouble with currying/uncurrying but hopefully we can fix it thanks to your sample 👍
I've had a bit of trouble with bugs in currying/uncurrying lately, but have managed to find a minimal example for one:
Repl link
Javascript:
In the javascript,
curry(2, x$$1)
is called on the input function, but it's already curried, and the end result is invalid.I'm not sure what the essential elements are but that the function is wrapped in an Option seems to be one.
The text was updated successfully, but these errors were encountered: