Basic misunderstanding? (Playground issue?)

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

Good to know I’m not completely hopeless.

1 Like