chasm
May 31, 2024, 2:13am
1
I am doing this and expecting “6” to be logged to the console, but I get {}
instead (in the Playground).
It is so simple and obvious that I am completely stumped as to what I’m missing, but something extremely basic, obviously.
let out = Belt.Array.reduce([1, 2, 3], 0, (sum, num) => sum + num)
Console.log(Belt.Int.toString(out))
Edit: this is working fine in my code, so evidently something I’m not understanding about the Playground.
Hey, the red {}
is just a badly stringified error (this is already fixed in a PR), but this error shows a deeper issue, the Belt and Core libraries don’t get correctly loaded right now, we have to fix that, good catch!
2 Likes
chasm
May 31, 2024, 8:38am
3
Good to know I’m not completely hopeless.
1 Like
@chasm we’ve finally fixed this bug, all runtime dependencies now get correctly imported and your example now works:
1 Like