genericBinarySearch

inline fun genericBinarySearch(    fromIndex: Int,     toIndex: Int,     invalid: (from: Int, to: Int, low: Int, high: Int) -> Int = { from, to, low, high -> -low - 1 },     check: (value: Int) -> Int): Int