mapWhileArray

inline fun <T> mapWhileArray(cond: (index: Int) -> Boolean, gen: (Int) -> T): Array<T>