I have a small problem to solve. I need a data str...
# getting-started
d
I have a small problem to solve. I need a data structure similar to map but it only allows to assign value the first time. I understood that I could create a customise Map class but I am looking for a shorter way from built int library. Ex:
Copy code
m = mutableMapOf<String, Int>()
m.put("a", 1)
m.put("a", 1) // throw exception here
Thanks @Ruckus. This saves my laziness.