How about (name is terrible, but the best I could ...
# getting-started
d
How about (name is terrible, but the best I could come up with):
Copy code
inline fun <T> Array<T>.ifNotEmptyOrElse(alternative: () -> Array<T>): Array<T> {
    return if (this.isEmpty()) alternative() else this
}