toList

fun toList(): List<E>

Returns all elements of this list as a List of type E.

Here's a simple usage example:

val notEmptyList: NotEmptyList<Int> = notEmptyListOf(1, 2, 3)
val list: List<Int> = notEmptyList.toList()
println(list) // [1, 2, 3]