/**
 * Given a value and an array of integers, find the index of the first occurrence of the value in the array.
 * If the value is not found in the array, return -1.
 *
 * @param value An integer value to search for in the array.
 * @param array A list of integers in which to search for the value.
 * @return The index of the first occurrence of the value in the array, or -1 if not found.
 */
fun breakLoop(value: Int, array: List<Int>): Int {

    var index = -1
    for (i in array.indices) {
        if (array[i] == value) {
            index = i
            break
        }
    }
    return index
}
/**
 * Given a value and an array of integers, find the index of the first occurrence of the value in the array.
 * If the value is not found in the array, return -1.
 *
 * @param value An integer value to search for in the array.
 * @param array A list of integers in which to search for the value.
 * @return The index of the first occurrence of the value in the array, or -1 if not found.
 */
fun breakLoop(value: Int, array: List<Int>): Int {
/**
 * Given a value and an array of integers, find the index of the first occurrence of the value in the array.
 * If the value is not found in the array, return -1.
 *
 * @param value An integer value to search for in the array.
 * @param array A list of integers in which to search for the value.
 * @return The index of the first occurrence of the value in the array, or -1 if not found.
 */
fun breakLoop(value: Int, array: List<Int>): Int {

    var index = -1
    for (i in array.indices) {
        if (array[i] == value) {
            index = i
            break
        }
    }
    return index
}