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
I've been reading the documentation specially the interop section as I'm just starting to play with Reason and I have to interact with Javascript a lot.
I ended up running node to test my explorations and I got trapped into a non-obvious situation. This is the problem I faced:
I had a function in Reason such as:
letlength= (xs:list(string)): int =>List.length(xs)
At this point I was totally lost. I spent some (too much) time re-reading the docs and I couldn't figure out the problem. After that, I asked on Discord and the answer was "don't use functions that expect lists from javascript, use arrays". Fair enough.
I guess that this issue is to suggest to add advice on that or more generally how to guard yourself from javascript-land when you are writing code in Reason and toying with it in node.
The text was updated successfully, but these errors were encountered:
Hello,
I've been reading the documentation specially the interop section as I'm just starting to play with Reason and I have to interact with Javascript a lot.
I ended up running
node
to test my explorations and I got trapped into a non-obvious situation. This is the problem I faced:I had a function in Reason such as:
And I used like that in node:
I didn't expect this at all, so I tried:
At this point I was totally lost. I spent some (too much) time re-reading the docs and I couldn't figure out the problem. After that, I asked on Discord and the answer was "don't use functions that expect lists from javascript, use arrays". Fair enough.
I guess that this issue is to suggest to add advice on that or more generally how to guard yourself from javascript-land when you are writing code in Reason and toying with it in node.
The text was updated successfully, but these errors were encountered: