/**
 * Find the intersection of two lists.
 *
 * Given two lists, this function returns a new list that contains the elements that are common to both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A new list containing the common elements between list1 and list2.
 */
fun findListIntersection(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

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

    return intersection
}
/**
 * Find the intersection of two lists.
 *
 * Given two lists, this function returns a new list that contains the elements that are common to both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A new list containing the common elements between list1 and list2.
 */
fun findListIntersection(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * Find the intersection of two lists.
 *
 * Given two lists, this function returns a new list that contains the elements that are common to both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A new list containing the common elements between list1 and list2.
 */
fun findListIntersection(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

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

    return intersection
}