kotlin.collections.elementAtOrElse

elementAtOrElse

fun <T> Iterable<T>.elementAtOrElse(
    index: Int, 
    defaultValue: (Int) -> T
): T

Returns an element at the given index or the result of calling the 登录查看完整内容