Join Slack
Powered by
Hi! Is it possible to map a MutableMap<String, ...
# announcements
l
LG
03/06/2019, 4:47 PM
Hi! Is it possible to map a
MutableMap<String, String>
into a
MutableMap<String, Float>
using a method like
mapValues
?
👌 5
h
hho
03/06/2019, 5:01 PM
e.g.
mapOf("e" to "2.718", "pi" to "3.141").mapValues { it.value.toFloat() }
hho
03/06/2019, 5:03 PM
or mutable:
https://pl.kotl.in/Hk0HadaUN
d
diesieben07
03/06/2019, 5:12 PM
You can do that more compact:
https://pl.kotl.in/r1PtJFTU4
👍 1
7
Views
Open in Slack
Previous
Next