/**
 * This function takes a list of vegetables and modifies each vegetable by chopping it into small pieces.
 *
 * @param chef The name of the chef who will chop the vegetables.
 * @param vegetables A list of vegetables to be chopped.
 */
fun chopVegetables(chef: String, vegetables: MutableList<String>) {

    if (chef != "Chef") {
        throw IllegalArgumentException("Only Chef can chop the vegetables!")
    }

    for (i in vegetables.indices) {
        if (vegetables[i] != "carrot" && vegetables[i] != "tomato") {
            vegetables[i] = "unknown"
        } else {
            vegetables[i] = "chopped ${vegetables[i]}"
        }
    }
}
/**
 * This function takes a list of vegetables and modifies each vegetable by chopping it into small pieces.
 *
 * @param chef The name of the chef who will chop the vegetables.
 * @param vegetables A list of vegetables to be chopped.
 */
fun chopVegetables(chef: String, vegetables: MutableList<String>) {
/**
 * This function takes a list of vegetables and modifies each vegetable by chopping it into small pieces.
 *
 * @param chef The name of the chef who will chop the vegetables.
 * @param vegetables A list of vegetables to be chopped.
 */
fun chopVegetables(chef: String, vegetables: MutableList<String>) {

    if (chef != "Chef") {
        throw IllegalArgumentException("Only Chef can chop the vegetables!")
    }

    for (i in vegetables.indices) {
        if (vegetables[i] != "carrot" && vegetables[i] != "tomato") {
            vegetables[i] = "unknown"
        } else {
            vegetables[i] = "chopped ${vegetables[i]}"
        }
    }
}