toNotEmptySetOrElse

@SinceKotools(project = Project.Types, version = "1.3")
infix inline fun <E> Array<E>.toNotEmptySetOrElse(defaultValue: (Array<E>) -> NotEmptySet<E>): NotEmptySet<E>

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

@SinceKotools(project = Project.Types, version = "1.3")
infix inline fun <E> Collection<E>.toNotEmptySetOrElse(defaultValue: (Collection<E>) -> NotEmptySet<E>): NotEmptySet<E>

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