/**
 * Given a list of animal records and a specific patient, this function returns the number of times the patient's record appears in the list.
 */
fun veterinarianRecords(animals: List<Any>, patient: Any): Int {

    var count = 0
    var index = 0

    // Iterate through the list of animal records
    while (index < animals.size) {
        // Check if the current record matches the patient's record using identity comparison
        if (animals[index] === patient) {
            count++ // Increment the count if a match is found
        }
        index++
    }

    return count
}
/**
 * Given a list of animal records and a specific patient, this function returns the number of times the patient's record appears in the list.
 */
fun veterinarianRecords(animals: List<Any>, patient: Any): Int {
/**
 * Given a list of animal records and a specific patient, this function returns the number of times the patient's record appears in the list.
 */
fun veterinarianRecords(animals: List<Any>, patient: Any): Int {

    var count = 0
    var index = 0

    // Iterate through the list of animal records
    while (index < animals.size) {
        // Check if the current record matches the patient's record using identity comparison
        if (animals[index] === patient) {
            count++ // Increment the count if a match is found
        }
        index++
    }

    return count
}