/**
 * This exercise aims to identify the predators within a given list of animals.
 *
 * Complete the code below to find and return the predators in the 'predatorList`.
 *
 * @param predatorList A list of animals
 * @return A list of animals from 'predatorList" that are predators
 *
 * Example:
 * findPredators(listOf("Lion", "Crocodile", "Rabbit", "Shark", "Tiger")) // ["Lion", "Crocodile", "Shark", "Tiger"]
 */
fun findPredators(predatorList: List<String>): List<String> {

    // Uncomment and complete the code below by using short-circuiting and tuple unpacking
    val predators = predatorList.filter { it in listOf("Lion", "Crocodile", "Shark", "Tiger") }

    return predators
}
/**
 * This exercise aims to identify the predators within a given list of animals.
 *
 * Complete the code below to find and return the predators in the 'predatorList`.
 *
 * @param predatorList A list of animals
 * @return A list of animals from 'predatorList" that are predators
 *
 * Example:
 * findPredators(listOf("Lion", "Crocodile", "Rabbit", "Shark", "Tiger")) // ["Lion", "Crocodile", "Shark", "Tiger"]
 */
fun findPredators(predatorList: List<String>): List<String> {
/**
 * This exercise aims to identify the predators within a given list of animals.
 *
 * Complete the code below to find and return the predators in the 'predatorList`.
 *
 * @param predatorList A list of animals
 * @return A list of animals from 'predatorList" that are predators
 *
 * Example:
 * findPredators(listOf("Lion", "Crocodile", "Rabbit", "Shark", "Tiger")) // ["Lion", "Crocodile", "Shark", "Tiger"]
 */
fun findPredators(predatorList: List<String>): List<String> {

    // Uncomment and complete the code below by using short-circuiting and tuple unpacking
    val predators = predatorList.filter { it in listOf("Lion", "Crocodile", "Shark", "Tiger") }

    return predators
}