/**
 * Chef needs to combine certain ingredients from the given list of ingredients.
 * Each ingredient will have a specific category and Chef only wants to combine ingredients from the 'vegetables' and 'spices' categories.
 * However, Chef does not like the ingredient 'carrots' and wants to exclude it.
 * Create a list comprehension that combines the ingredients according to Chef's requirements and returns the final list.
 *
 * @param chefsList A list of ingredients that Chef needs to combine.
 * @param ingredients A list of all available ingredients with their categories.
 * @return A list of combined ingredients according to Chef's requirements.
 */
fun combineIngredients(chefsList: List<String>, ingredients: List<Pair<String, String>>): List<Pair<String, String>> {

    // Combine ingredients which are vegetables or spices, but not carrots
    return ingredients.filter { it.second in listOf("vegetables", "spices") && it.first != "carrots" }
}
/**
 * Chef needs to combine certain ingredients from the given list of ingredients.
 * Each ingredient will have a specific category and Chef only wants to combine ingredients from the 'vegetables' and 'spices' categories.
 * However, Chef does not like the ingredient 'carrots' and wants to exclude it.
 * Create a list comprehension that combines the ingredients according to Chef's requirements and returns the final list.
 *
 * @param chefsList A list of ingredients that Chef needs to combine.
 * @param ingredients A list of all available ingredients with their categories.
 * @return A list of combined ingredients according to Chef's requirements.
 */
fun combineIngredients(chefsList: List<String>, ingredients: List<Pair<String, String>>): List<Pair<String, String>> {
/**
 * Chef needs to combine certain ingredients from the given list of ingredients.
 * Each ingredient will have a specific category and Chef only wants to combine ingredients from the 'vegetables' and 'spices' categories.
 * However, Chef does not like the ingredient 'carrots' and wants to exclude it.
 * Create a list comprehension that combines the ingredients according to Chef's requirements and returns the final list.
 *
 * @param chefsList A list of ingredients that Chef needs to combine.
 * @param ingredients A list of all available ingredients with their categories.
 * @return A list of combined ingredients according to Chef's requirements.
 */
fun combineIngredients(chefsList: List<String>, ingredients: List<Pair<String, String>>): List<Pair<String, String>> {

    // Combine ingredients which are vegetables or spices, but not carrots
    return ingredients.filter { it.second in listOf("vegetables", "spices") && it.first != "carrots" }
}