I created a map from two lists of mutable strings in Kotlin using:
val mapNames = mutableMapOf(Pair(initList, nameList))
When I try to access the values of one of the keys I have tried
print(mapNames.get("BB")) and print(mapNames["BB"]) and it throws the error
error: type inference failed. The value of the type parameter K should be mentioned in input types (argument types, receiver type or expected type). Try to specify it explicitly.
Both lists are lists of strings and I am just trying to simply return the value associated with the key. I have tried to explicitly specify its type as String and am still thrown an error. I am wondering what I am missing?