toNotEmptyList

@SinceKotoolsTypes(version = "4.0")
fun <E> Collection<E>.toNotEmptyList(): Result<NotEmptyList<E>>

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