/**
 * This function takes two tuples as inputs and returns a list of common elements between them.
 *
 * @param tuple1 The first tuple.
 * @param tuple2 The second tuple.
 * @return A list of common elements between the two tuples.
 */
fun commonMembers(tuple1: List<Any>, tuple2: List<Any>): List<Any> {

    // Find the intersection of the two tuples using set operations
    val intersect = tuple1.toSet() intersect tuple2.toSet()

    // Convert the intersection set back to a list
    val commonElements = intersect.toList()

    return commonElements
}
/**
 * This function takes two tuples as inputs and returns a list of common elements between them.
 *
 * @param tuple1 The first tuple.
 * @param tuple2 The second tuple.
 * @return A list of common elements between the two tuples.
 */
fun commonMembers(tuple1: List<Any>, tuple2: List<Any>): List<Any> {
/**
 * This function takes two tuples as inputs and returns a list of common elements between them.
 *
 * @param tuple1 The first tuple.
 * @param tuple2 The second tuple.
 * @return A list of common elements between the two tuples.
 */
fun commonMembers(tuple1: List<Any>, tuple2: List<Any>): List<Any> {

    // Find the intersection of the two tuples using set operations
    val intersect = tuple1.toSet() intersect tuple2.toSet()

    // Convert the intersection set back to a list
    val commonElements = intersect.toList()

    return commonElements
}