I'd like to get a new instance of some Map with the same content but Map doesn't have a built-in copy
method. I can do something like this:
val newInst = someMap.map { it.toPair() }.toMap()
But it looks rather ugly. Is there any more smarter way to do this?