Whats the best way of converting of converting a L...
# stdlib
m
Whats the best way of converting of converting a List to an immutable list? If I do
driveActivities = drivingActivities.toImmutableList()
The compiler complains because
toImuutableList()
return a
List
I can use
driveActivities = drivingActivities.toPersistentList()
but it somehow feels like I'm leaking Impl details?
If I understood https://github.com/Kotlin/kotlinx.collections.immutable/issues/140 discussion correctly then using persitentList builder does not look like a bad idea