کلاس جنریک:
class ArrayUtil<T>(private val array : Array<T>) {
fun findElement(element : T, foundElement:(index: Int, element: T?)->Unit){
for(i in array.indices){
if(array[i] == element){
foundElement(i, element)
return
}
}
foundElement(-1, null)
return
}
}