toNotEmptyMutableListOrElse

@SinceKotoolsTypes(version = "1.3")
infix inline fun <E> Array<E>.toNotEmptyMutableListOrElse(defaultValue: (Array<E>) -> NotEmptyMutableList<E>): NotEmptyMutableList<E>

Returns a not empty mutable list containing all the elements of this array, or returns the result of calling the defaultValue function if this array is empty.


@SinceKotoolsTypes(version = "1.3")
infix inline fun <E> Collection<E>.toNotEmptyMutableListOrElse(defaultValue: (Collection<E>) -> NotEmptyMutableList<E>): NotEmptyMutableList<E>

Returns a not empty mutable list containing all the elements of this collection, or returns the result of calling the defaultValue function if this collection is empty.