One of the advantages of Reason ML over JavaScript is that it provides a Map type that uses structural equality rather than reference equality.
However, I cannot find examples of using this.
For example, how can I declare a scores type, which is a string map for integers?
type scores = Map<string, int>;
And how do I build an instance?
let myMap = scores(); let myMap2 = myMap.set('x', 100);
source share