/**
 * You are a nurse and you have a list of patient numbers.
 * Your task is to find the index at which the targetNumber occurs for the first time,
 * and if it does not occur, then return -1.
 * However, you cannot use a loop construct like 'for' or 'while',
 * instead, you have to use the range function and the 'continue' statement.
 *
 * @param numberList A list of patient numbers.
 * @param targetNumber The number to be found.
 * @return The index at which the targetNumber occurs for the first time,
 *         or -1 if it does not occur in the list.
 */
fun findSpecificNumbers(numberList: List<Int>, targetNumber: Int): Int {

    // Check if numberList is empty
    if (numberList.isEmpty()) {
        return -1
    }

    // Iterate through the range of indices of the numberList
    for (index in numberList.indices) {
        // Skip the current iteration if the number is not equal to targetNumber
        if (numberList[index] != targetNumber) {
            continue
        }

        // Return the index if the number matches the targetNumber
        return index
    }

    // Return -1 if targetNumber does not occur
    return -1
}
/**
 * You are a nurse and you have a list of patient numbers.
 * Your task is to find the index at which the targetNumber occurs for the first time,
 * and if it does not occur, then return -1.
 * However, you cannot use a loop construct like 'for' or 'while',
 * instead, you have to use the range function and the 'continue' statement.
 *
 * @param numberList A list of patient numbers.
 * @param targetNumber The number to be found.
 * @return The index at which the targetNumber occurs for the first time,
 *         or -1 if it does not occur in the list.
 */
fun findSpecificNumbers(numberList: List<Int>, targetNumber: Int): Int {
/**
 * You are a nurse and you have a list of patient numbers.
 * Your task is to find the index at which the targetNumber occurs for the first time,
 * and if it does not occur, then return -1.
 * However, you cannot use a loop construct like 'for' or 'while',
 * instead, you have to use the range function and the 'continue' statement.
 *
 * @param numberList A list of patient numbers.
 * @param targetNumber The number to be found.
 * @return The index at which the targetNumber occurs for the first time,
 *         or -1 if it does not occur in the list.
 */
fun findSpecificNumbers(numberList: List<Int>, targetNumber: Int): Int {

    // Check if numberList is empty
    if (numberList.isEmpty()) {
        return -1
    }

    // Iterate through the range of indices of the numberList
    for (index in numberList.indices) {
        // Skip the current iteration if the number is not equal to targetNumber
        if (numberList[index] != targetNumber) {
            continue
        }

        // Return the index if the number matches the targetNumber
        return index
    }

    // Return -1 if targetNumber does not occur
    return -1
}