Getting the hang of Collections. How do a List of Pairs and a Map differ in practical use, and when should I chose one over the other?
I've noticed that I can create both pairs and maps with the "to" infix function:
val listaOfPairs : List<Pair<String, Int>> = listOf( "ciao" to 2)
val map: Map <String, Int> = mapOf( "ciao" to 2 )
Thanks 🤗 🤗