toNotEmptyList

@SinceKotools(project = Project.Types, version = "3.2")
fun <E> Collection<E>.toNotEmptyList(): Result<NotEmptyList<E>>

Returns a NotEmptyList containing all the elements of this collection, or an IllegalArgumentException if this collection is empty.