/**
 * Given a list of numbers and a search value,
 * find the index of the first occurrence of the search value
 * in the list using a while loop.
 *
 * @param numbers A list of numbers (integers or floats).
 * @param searchValue The value to be searched.
 * @return The index of the first occurrence of the search value in the list.
 * If the search value does not exist in the list, return -1.
 */
fun intersectionExample(numbers: List<Double>, searchValue: Double): Int {

    var index = 0
    while (index < numbers.size) {
        if (numbers[index] == searchValue) {
            return index
        }
        index++
    }
    return -1
}
/**
 * Given a list of numbers and a search value,
 * find the index of the first occurrence of the search value
 * in the list using a while loop.
 *
 * @param numbers A list of numbers (integers or floats).
 * @param searchValue The value to be searched.
 * @return The index of the first occurrence of the search value in the list.
 * If the search value does not exist in the list, return -1.
 */
fun intersectionExample(numbers: List<Double>, searchValue: Double): Int {
/**
 * Given a list of numbers and a search value,
 * find the index of the first occurrence of the search value
 * in the list using a while loop.
 *
 * @param numbers A list of numbers (integers or floats).
 * @param searchValue The value to be searched.
 * @return The index of the first occurrence of the search value in the list.
 * If the search value does not exist in the list, return -1.
 */
fun intersectionExample(numbers: List<Double>, searchValue: Double): Int {

    var index = 0
    while (index < numbers.size) {
        if (numbers[index] == searchValue) {
            return index
        }
        index++
    }
    return -1
}