/**
 * Cooks a medley of vegetables for a specified cooking time.
 *
 * The function takes in a list of vegetables and a cooking time in minutes. Each vegetable will be cooked for the
 * specified cooking time. However, if a certain condition is met, the vegetable will not be cooked.
 *
 * @param vegetables A list of vegetables to be cooked.
 * @param cookingTime The cooking time in minutes.
 * @return The list of cooked vegetables.
 */
fun cookVegetableMedley(vegetables: List<String>, cookingTime: Int): List<String> {

    val cookedVegetables = mutableListOf<String>()
    for (vegetable in vegetables) {
        val cookCarrot = vegetable == "carrot"
        for (i in 0 until cookingTime) {
            if (cookCarrot) {
                cookedVegetables.add("carrot")
            } else {
                cookedVegetables.add(vegetable)
            }
        }
    }
    return cookedVegetables
}

// Let's test our function
/**
 * Cooks a medley of vegetables for a specified cooking time.
 *
 * The function takes in a list of vegetables and a cooking time in minutes. Each vegetable will be cooked for the
 * specified cooking time. However, if a certain condition is met, the vegetable will not be cooked.
 *
 * @param vegetables A list of vegetables to be cooked.
 * @param cookingTime The cooking time in minutes.
 * @return The list of cooked vegetables.
 */
fun cookVegetableMedley(vegetables: List<String>, cookingTime: Int): List<String> {
/**
 * Cooks a medley of vegetables for a specified cooking time.
 *
 * The function takes in a list of vegetables and a cooking time in minutes. Each vegetable will be cooked for the
 * specified cooking time. However, if a certain condition is met, the vegetable will not be cooked.
 *
 * @param vegetables A list of vegetables to be cooked.
 * @param cookingTime The cooking time in minutes.
 * @return The list of cooked vegetables.
 */
fun cookVegetableMedley(vegetables: List<String>, cookingTime: Int): List<String> {

    val cookedVegetables = mutableListOf<String>()
    for (vegetable in vegetables) {
        val cookCarrot = vegetable == "carrot"
        for (i in 0 until cookingTime) {
            if (cookCarrot) {
                cookedVegetables.add("carrot")
            } else {
                cookedVegetables.add(vegetable)
            }
        }
    }
    return cookedVegetables
}

// Let's test our function