What would be a good way of copying a list in Kotl...
# announcements
m
What would be a good way of copying a list in Kotlin? I can think of doing it the Java way: 1️⃣
ArrayList(list)
but it seems un-Kotlin-ish. Using Kotlin’s list extensions I could do: 2️⃣
list.toList()
but it looks pretty confusing. I’d be grateful to get suggestions of a better approach or votes which of those two you’d use.