/**
 * This function takes an interior design as input and modifies the elements of a specific type with a new value.
 *
 * @param interiorDesign List of tuples representing interior elements, each containing element name and value.
 * @param elementName Name of the element to be modified.
 * @param newValue New value to be assigned to the element.
 * @return Modified interior design after applying the changes.
 */
fun modifyInteriorElements(interiorDesign: MutableList<Pair<String, String>>, elementName: String, newValue: String): MutableList<Pair<String, String>> {

    // Iterate over each element in the interior design
    for (i in interiorDesign.indices) {
        val (name, value) = interiorDesign[i]

        // Check if the element name matches the one to be modified and identity comparison if the value is the same object
        if (name == elementName && value === value) {
            // Modify the element value in the interior design
            interiorDesign[i] = Pair(name, newValue)
        }
    }
    return interiorDesign
}
/**
 * This function takes an interior design as input and modifies the elements of a specific type with a new value.
 *
 * @param interiorDesign List of tuples representing interior elements, each containing element name and value.
 * @param elementName Name of the element to be modified.
 * @param newValue New value to be assigned to the element.
 * @return Modified interior design after applying the changes.
 */
fun modifyInteriorElements(interiorDesign: MutableList<Pair<String, String>>, elementName: String, newValue: String): MutableList<Pair<String, String>> {
/**
 * This function takes an interior design as input and modifies the elements of a specific type with a new value.
 *
 * @param interiorDesign List of tuples representing interior elements, each containing element name and value.
 * @param elementName Name of the element to be modified.
 * @param newValue New value to be assigned to the element.
 * @return Modified interior design after applying the changes.
 */
fun modifyInteriorElements(interiorDesign: MutableList<Pair<String, String>>, elementName: String, newValue: String): MutableList<Pair<String, String>> {

    // Iterate over each element in the interior design
    for (i in interiorDesign.indices) {
        val (name, value) = interiorDesign[i]

        // Check if the element name matches the one to be modified and identity comparison if the value is the same object
        if (name == elementName && value === value) {
            // Modify the element value in the interior design
            interiorDesign[i] = Pair(name, newValue)
        }
    }
    return interiorDesign
}