I have a string map like this:
let table = Belt.Map.String.fromArray([|("A", 1), ("B", 1), ("C", 3)|]);
When I compile this single line, BuckleScript JS output says that table
is not a pure module. From my understanding of the Map
, when you do a look up either the entry exists in which case it returns Some(value)
or None
, and should not have any side effects as far as I can tell. So, why is BS saying that it's not 'pure'?