/**
 * Given an old pattern and a new pattern, update the designer's pattern collection by replacing the old pattern
 * with the new pattern. Return the updated pattern collection.
 *
 * @param oldPattern A set containing the old patterns.
 * @param newPattern A set containing the new patterns.
 * @return The updated pattern collection after replacing the old pattern with the new pattern.
 */
fun updatePattern(oldPattern: MutableSet<String>, newPattern: Set<String>): MutableSet<String> {

    val patternCollection = mutableSetOf("Polka dots", "Stripes", "Floral", "Checkered")
    
    // Remove old pattern from pattern collection
    patternCollection.removeAll(oldPattern)
    
    // Add new pattern to pattern collection
    patternCollection.addAll(newPattern)
    
    return patternCollection
}
/**
 * Given an old pattern and a new pattern, update the designer's pattern collection by replacing the old pattern
 * with the new pattern. Return the updated pattern collection.
 *
 * @param oldPattern A set containing the old patterns.
 * @param newPattern A set containing the new patterns.
 * @return The updated pattern collection after replacing the old pattern with the new pattern.
 */
fun updatePattern(oldPattern: MutableSet<String>, newPattern: Set<String>): MutableSet<String> {
/**
 * Given an old pattern and a new pattern, update the designer's pattern collection by replacing the old pattern
 * with the new pattern. Return the updated pattern collection.
 *
 * @param oldPattern A set containing the old patterns.
 * @param newPattern A set containing the new patterns.
 * @return The updated pattern collection after replacing the old pattern with the new pattern.
 */
fun updatePattern(oldPattern: MutableSet<String>, newPattern: Set<String>): MutableSet<String> {

    val patternCollection = mutableSetOf("Polka dots", "Stripes", "Floral", "Checkered")
    
    // Remove old pattern from pattern collection
    patternCollection.removeAll(oldPattern)
    
    // Add new pattern to pattern collection
    patternCollection.addAll(newPattern)
    
    return patternCollection
}