LastExceed
06/10/2020, 3:32 PMlistOf("banana").map { it to 42 }.toMap()
is there an easier way to do this ?
basically i want to turn a list into a map by providing a lambda that associates each element from the list with a value to form a key-value pairShawn
06/10/2020, 3:34 PMassociate*
family of functionsChantry Cargill
06/10/2020, 3:34 PMlistOf("banana").associate { it to 42 }
Shawn
06/10/2020, 3:35 PMShawn
06/10/2020, 3:35 PMassociateWith { 42 }
LastExceed
06/10/2020, 3:35 PMShawn
06/10/2020, 3:37 PMDominaezzz
06/10/2020, 4:28 PMmapOf("banana" to 42)
😛