/**
 * Given two lists [args1] and [args2], return a list of tuples containing the intersection between the two lists.
 *
 * @param args1 A list of elements.
 * @param args2 A list of elements.
 * @return A list of tuples containing the intersecting elements.
 */
fun intersection(args1: List<Any>, args2: List<Any>): List<Pair<Any, Any>> {

    val intersectionList = args1.flatMap { item1 ->
        args2.mapNotNull { item2 ->
            if (item1 == item2) Pair(item1, item2) else null
        }
    }
    return intersectionList
}
/**
 * Given two lists [args1] and [args2], return a list of tuples containing the intersection between the two lists.
 *
 * @param args1 A list of elements.
 * @param args2 A list of elements.
 * @return A list of tuples containing the intersecting elements.
 */
fun intersection(args1: List<Any>, args2: List<Any>): List<Pair<Any, Any>> {
/**
 * Given two lists [args1] and [args2], return a list of tuples containing the intersection between the two lists.
 *
 * @param args1 A list of elements.
 * @param args2 A list of elements.
 * @return A list of tuples containing the intersecting elements.
 */
fun intersection(args1: List<Any>, args2: List<Any>): List<Pair<Any, Any>> {

    val intersectionList = args1.flatMap { item1 ->
        args2.mapNotNull { item2 ->
            if (item1 == item2) Pair(item1, item2) else null
        }
    }
    return intersectionList
}