Reputation: 51069
Suppose I have a set with elements. How to create List of the same elements? I see methiods asSequence and asIterable, but no asList, why?
asSequence
asIterable
asList
Upvotes: 16
Views: 8186
Reputation: 81959
The function you're looking for is called toList():
toList()
val set: Set<Int> = setOf(1,2,3) val list: List<Int> = set.toList()
Upvotes: 34