/**
 * This function takes a list, appends the elements to it using the OR operator,
 * and returns the updated list.
 *
 * @param my_list The original list.
 * @param element1 The first element to append to the list.
 * @param element2 The second element to append to the list.
 * @return The updated list after appending the elements.
 */
fun appendElementsOrOperator(myList: MutableList<Any>, element1: Any, element2: Any): MutableList<Any> {

    if (myList !is MutableList<*>) {
        throw IllegalArgumentException("The provided input is not a list.")
    }

    if (element1 == element2) {
        return myList
    }

    myList += if (element1 !in myList) {
        element1
    } else {
        element2
    }

    return myList
}
/**
 * This function takes a list, appends the elements to it using the OR operator,
 * and returns the updated list.
 *
 * @param my_list The original list.
 * @param element1 The first element to append to the list.
 * @param element2 The second element to append to the list.
 * @return The updated list after appending the elements.
 */
fun appendElementsOrOperator(myList: MutableList<Any>, element1: Any, element2: Any): MutableList<Any> {
/**
 * This function takes a list, appends the elements to it using the OR operator,
 * and returns the updated list.
 *
 * @param my_list The original list.
 * @param element1 The first element to append to the list.
 * @param element2 The second element to append to the list.
 * @return The updated list after appending the elements.
 */
fun appendElementsOrOperator(myList: MutableList<Any>, element1: Any, element2: Any): MutableList<Any> {

    if (myList !is MutableList<*>) {
        throw IllegalArgumentException("The provided input is not a list.")
    }

    if (element1 == element2) {
        return myList
    }

    myList += if (element1 !in myList) {
        element1
    } else {
        element2
    }

    return myList
}