/**
 * A farmer wants to add eggs to his list of items in the farm, but he only wants to add eggs if they don't already exist in the list.
 * Complete the function 'addEggs' to accomplish this task.
 *
 * @param farmList A list containing the items currently on the farm.
 * @param eggs A list of eggs to be added to the farmList.
 * @return A new list with the original items on the farm and the eggs added without duplications.
 */
fun addEggs(farmList: MutableList<String>, eggs: List<String>): MutableList<String> {

    // Create a set of existing farm items to quickly check for duplications
    val existingItems = farmList.toSet()

    // Iterate over the eggs list and only add the ones that don't already exist in the farmList
    for (egg in eggs) {
        if (egg !in existingItems) {
            farmList.add(egg)
        }
    }

    return farmList
}
/**
 * A farmer wants to add eggs to his list of items in the farm, but he only wants to add eggs if they don't already exist in the list.
 * Complete the function 'addEggs' to accomplish this task.
 *
 * @param farmList A list containing the items currently on the farm.
 * @param eggs A list of eggs to be added to the farmList.
 * @return A new list with the original items on the farm and the eggs added without duplications.
 */
fun addEggs(farmList: MutableList<String>, eggs: List<String>): MutableList<String> {
/**
 * A farmer wants to add eggs to his list of items in the farm, but he only wants to add eggs if they don't already exist in the list.
 * Complete the function 'addEggs' to accomplish this task.
 *
 * @param farmList A list containing the items currently on the farm.
 * @param eggs A list of eggs to be added to the farmList.
 * @return A new list with the original items on the farm and the eggs added without duplications.
 */
fun addEggs(farmList: MutableList<String>, eggs: List<String>): MutableList<String> {

    // Create a set of existing farm items to quickly check for duplications
    val existingItems = farmList.toSet()

    // Iterate over the eggs list and only add the ones that don't already exist in the farmList
    for (egg in eggs) {
        if (egg !in existingItems) {
            farmList.add(egg)
        }
    }

    return farmList
}