/**
 * Chef is trying to modify a list of ingredients to remove any that contain certain words.
 * Using filtering and nested logical operators, this function removes the unwanted ingredients.
 *
 * @param chef The name of the chef.
 * @param ingredients The list of ingredients.
 * @return The modified list of ingredients.
 */
fun modifyIngredients(chef: String, ingredients: List<String>): List<String> {

    val forbiddenWords = listOf("salt", "sugar", "chili", "pepper")

    // Chef will only modify the ingredients if they don't contain any forbidden words
    // Remove the ingredients from the list that contain any forbidden words
    val modifiedIngredients = ingredients.filter { ingredient ->
        forbiddenWords.none { word -> word in ingredient }
    }

    return modifiedIngredients
}
/**
 * Chef is trying to modify a list of ingredients to remove any that contain certain words.
 * Using filtering and nested logical operators, this function removes the unwanted ingredients.
 *
 * @param chef The name of the chef.
 * @param ingredients The list of ingredients.
 * @return The modified list of ingredients.
 */
fun modifyIngredients(chef: String, ingredients: List<String>): List<String> {
/**
 * Chef is trying to modify a list of ingredients to remove any that contain certain words.
 * Using filtering and nested logical operators, this function removes the unwanted ingredients.
 *
 * @param chef The name of the chef.
 * @param ingredients The list of ingredients.
 * @return The modified list of ingredients.
 */
fun modifyIngredients(chef: String, ingredients: List<String>): List<String> {

    val forbiddenWords = listOf("salt", "sugar", "chili", "pepper")

    // Chef will only modify the ingredients if they don't contain any forbidden words
    // Remove the ingredients from the list that contain any forbidden words
    val modifiedIngredients = ingredients.filter { ingredient ->
        forbiddenWords.none { word -> word in ingredient }
    }

    return modifiedIngredients
}