getOrElse

fun <Element> KoneList<Element>.getOrElse(index: UInt, block: () -> Element): Element(source)

Returns the element at the provided index or the result of block if index is out of bounds.