/**
 * Given a list of fruits and a season, return a new list containing only the fruits that are currently in season.
 *
 * @param fruits A list of strings representing different fruits.
 * @param season A string representing the current season.
 * @return A list containing the fruits that are currently in season.
 */
fun filterFruit(fruits: List<String>, season: String): List<String> {

    return when (season) {
        "spring" -> fruits.filter { it == "apple" || it == "cherry" }
        "summer" -> fruits.filter { it == "watermelon" || it == "grape" }
        "fall" -> fruits.filter { it == "pear" || it == "plum" }
        "winter" -> fruits.filter { it == "orange" || it == "kiwi" }
        else -> emptyList()
    }
}

val fruits = listOf("apple", "banana", "cherry", "watermelon", "grape", "pear", "plum", "orange", "kiwi")
/**
 * Given a list of fruits and a season, return a new list containing only the fruits that are currently in season.
 *
 * @param fruits A list of strings representing different fruits.
 * @param season A string representing the current season.
 * @return A list containing the fruits that are currently in season.
 */
fun filterFruit(fruits: List<String>, season: String): List<String> {
/**
 * Given a list of fruits and a season, return a new list containing only the fruits that are currently in season.
 *
 * @param fruits A list of strings representing different fruits.
 * @param season A string representing the current season.
 * @return A list containing the fruits that are currently in season.
 */
fun filterFruit(fruits: List<String>, season: String): List<String> {

    return when (season) {
        "spring" -> fruits.filter { it == "apple" || it == "cherry" }
        "summer" -> fruits.filter { it == "watermelon" || it == "grape" }
        "fall" -> fruits.filter { it == "pear" || it == "plum" }
        "winter" -> fruits.filter { it == "orange" || it == "kiwi" }
        else -> emptyList()
    }
}

val fruits = listOf("apple", "banana", "cherry", "watermelon", "grape", "pear", "plum", "orange", "kiwi")