/**
 * You are an astronomer working on updating your catalog of celestial objects.
 * Your task is to update the catalog by adding the new observed celestial objects to the current ones.
 *
 * Write a function that takes the updated celestial objects and the current objects as parameters
 * and returns the updated catalog after adding the new objects.
 *
 * Each celestial object is represented by a string containing its name.
 *
 * Hint: Use a loop to iterate over the new celestial objects and add them to the current objects.
 *
 * @param updatedObjects A list of strings representing the newly observed celestial objects.
 * @param currentObjects A set of strings representing the current celestial objects.
 * @return The updated catalog after adding the newly observed celestial objects.
 *
 * Example:
 * updateCatalog(listOf("Andromeda", "Orion", "Crab Nebula"), setOf("Andromeda Galaxy", "Orion Nebula"))
 * // Returns: setOf("Andromeda Galaxy", "Orion Nebula", "Andromeda", "Orion", "Crab Nebula")
 */
fun updateCatalog(updatedObjects: List<String>, currentObjects: MutableSet<String>): Set<String> {

    for (obj in updatedObjects) {
        currentObjects.add(obj)
    }
    return currentObjects
}
/**
 * You are an astronomer working on updating your catalog of celestial objects.
 * Your task is to update the catalog by adding the new observed celestial objects to the current ones.
 *
 * Write a function that takes the updated celestial objects and the current objects as parameters
 * and returns the updated catalog after adding the new objects.
 *
 * Each celestial object is represented by a string containing its name.
 *
 * Hint: Use a loop to iterate over the new celestial objects and add them to the current objects.
 *
 * @param updatedObjects A list of strings representing the newly observed celestial objects.
 * @param currentObjects A set of strings representing the current celestial objects.
 * @return The updated catalog after adding the newly observed celestial objects.
 *
 * Example:
 * updateCatalog(listOf("Andromeda", "Orion", "Crab Nebula"), setOf("Andromeda Galaxy", "Orion Nebula"))
 * // Returns: setOf("Andromeda Galaxy", "Orion Nebula", "Andromeda", "Orion", "Crab Nebula")
 */
fun updateCatalog(updatedObjects: List<String>, currentObjects: MutableSet<String>): Set<String> {
/**
 * You are an astronomer working on updating your catalog of celestial objects.
 * Your task is to update the catalog by adding the new observed celestial objects to the current ones.
 *
 * Write a function that takes the updated celestial objects and the current objects as parameters
 * and returns the updated catalog after adding the new objects.
 *
 * Each celestial object is represented by a string containing its name.
 *
 * Hint: Use a loop to iterate over the new celestial objects and add them to the current objects.
 *
 * @param updatedObjects A list of strings representing the newly observed celestial objects.
 * @param currentObjects A set of strings representing the current celestial objects.
 * @return The updated catalog after adding the newly observed celestial objects.
 *
 * Example:
 * updateCatalog(listOf("Andromeda", "Orion", "Crab Nebula"), setOf("Andromeda Galaxy", "Orion Nebula"))
 * // Returns: setOf("Andromeda Galaxy", "Orion Nebula", "Andromeda", "Orion", "Crab Nebula")
 */
fun updateCatalog(updatedObjects: List<String>, currentObjects: MutableSet<String>): Set<String> {

    for (obj in updatedObjects) {
        currentObjects.add(obj)
    }
    return currentObjects
}