toNotEmptyList

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

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