HashMap in Scala
Comment¶
HashTable is a trait without a factory method and thus cannot be instantiated. HashMap and HashSet are subclasses that you should use.
https://stackoverflow.com/questions/3648870/scala-using-hashmap-with-a-default-value
Hashmap in Kotlin
References¶
- LinkedHashMap preserves the insertion order (which is similar to dict in Python 3.7+).