toNotEmptyList

@SinceKotoolsTypes(version = "1.3")
inline fun <E> Array<E>.toNotEmptyList(): NotEmptyList<E>

Returns a not empty list containing all the elements of this array, or throws an IllegalArgumentException if this array is empty.


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

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