How can I do a copy of a Map ‘a’ without keeping a reference to it.
var x = a // x is now referencing a
var y = clone(a) // y is still referencing a
The only solution I found was:
var z = Map()
z[elem.first] = elem.second;