/**
 * This function appends new elements from list2 to list1.
 *
 * @param list1 A list containing elements.
 * @param list2 A list containing elements to be appended.
 * @return A list with new elements appended from list2.
 */
fun appendElements(list1: MutableList<Any>, list2: List<Any>): MutableList<Any> {

    for (element in list2) {
        if (element !in list1) {
            list1.add(element)
        }
    }
    return list1
}
/**
 * This function appends new elements from list2 to list1.
 *
 * @param list1 A list containing elements.
 * @param list2 A list containing elements to be appended.
 * @return A list with new elements appended from list2.
 */
fun appendElements(list1: MutableList<Any>, list2: List<Any>): MutableList<Any> {
/**
 * This function appends new elements from list2 to list1.
 *
 * @param list1 A list containing elements.
 * @param list2 A list containing elements to be appended.
 * @return A list with new elements appended from list2.
 */
fun appendElements(list1: MutableList<Any>, list2: List<Any>): MutableList<Any> {

    for (element in list2) {
        if (element !in list1) {
            list1.add(element)
        }
    }
    return list1
}