/**
 * This function takes a veterinarian and a type of animal as input, and removes all animals
 * of that type from the veterinarian's list of animals. The function uses slicing and break
 * and continue statements to achieve this.
 *
 * @param vet A list of animals that the veterinarian has.
 * @param animalType The type of animal to be removed.
 * @return The updated list of animals after removing the specified animal type.
 */
fun removeAnimals(vet: MutableList<Any>, animalType: String): MutableList<Any> {

    var i = 0
    while (i < vet.size) {
        val animal = vet[i]
        if (animal::class.simpleName == animalType) {
            vet.removeAt(i)
            continue
        }
        i++
    }
    return vet
}
/**
 * This function takes a veterinarian and a type of animal as input, and removes all animals
 * of that type from the veterinarian's list of animals. The function uses slicing and break
 * and continue statements to achieve this.
 *
 * @param vet A list of animals that the veterinarian has.
 * @param animalType The type of animal to be removed.
 * @return The updated list of animals after removing the specified animal type.
 */
fun removeAnimals(vet: MutableList<Any>, animalType: String): MutableList<Any> {
/**
 * This function takes a veterinarian and a type of animal as input, and removes all animals
 * of that type from the veterinarian's list of animals. The function uses slicing and break
 * and continue statements to achieve this.
 *
 * @param vet A list of animals that the veterinarian has.
 * @param animalType The type of animal to be removed.
 * @return The updated list of animals after removing the specified animal type.
 */
fun removeAnimals(vet: MutableList<Any>, animalType: String): MutableList<Any> {

    var i = 0
    while (i < vet.size) {
        val animal = vet[i]
        if (animal::class.simpleName == animalType) {
            vet.removeAt(i)
            continue
        }
        i++
    }
    return vet
}