/**
 * This function takes a list of fashion store and a list of new stocks,
 * and updates the stock of each fashion item in the store.
 * The function uses nested for loops to iterate over the fashion store and new stocks,
 * and modifies the stock of each fashion item.
 */
fun updateStock(fashionStore: MutableList<MutableMap<String, Any>>, newStocks: List<MutableMap<String, Any>>): MutableList<MutableMap<String, Any>> {

    for (item in newStocks) {
        for (fashionItem in fashionStore) {
            if (fashionItem["name"] == item["name"]) {
                fashionItem["stock"] = (fashionItem["stock"] as Int) + (item["stock"] as Int)
            }
        }
    }
    return fashionStore
}

// Example usage:
/**
 * This function takes a list of fashion store and a list of new stocks,
 * and updates the stock of each fashion item in the store.
 * The function uses nested for loops to iterate over the fashion store and new stocks,
 * and modifies the stock of each fashion item.
 */
fun updateStock(fashionStore: MutableList<MutableMap<String, Any>>, newStocks: List<MutableMap<String, Any>>): MutableList<MutableMap<String, Any>> {
/**
 * This function takes a list of fashion store and a list of new stocks,
 * and updates the stock of each fashion item in the store.
 * The function uses nested for loops to iterate over the fashion store and new stocks,
 * and modifies the stock of each fashion item.
 */
fun updateStock(fashionStore: MutableList<MutableMap<String, Any>>, newStocks: List<MutableMap<String, Any>>): MutableList<MutableMap<String, Any>> {

    for (item in newStocks) {
        for (fashionItem in fashionStore) {
            if (fashionItem["name"] == item["name"]) {
                fashionItem["stock"] = (fashionItem["stock"] as Int) + (item["stock"] as Int)
            }
        }
    }
    return fashionStore
}

// Example usage: