/**
 * Given a list of tuples and a list of numbers, return the intersection between the two using tuple unpacking
 * and list comprehension.
 *
 * @param tuplesList A list of tuples containing an integer and a string.
 * @param numbersList A list of integers.
 * @return A list of tuples containing common values between the two input lists.
 */
fun intersectionTuplesLists(tuplesList: List<Pair<Int, String>>, numbersList: List<Int>): List<Pair<Int, String>> {

    // Unpack the tuples using destructuring and check for intersection with numbers list using filter and map
    val intersection = tuplesList.filter { (num, _) -> num in numbersList }
                                 .map { it -> Pair(it.first, it.second) }

    return intersection
}
/**
 * Given a list of tuples and a list of numbers, return the intersection between the two using tuple unpacking
 * and list comprehension.
 *
 * @param tuplesList A list of tuples containing an integer and a string.
 * @param numbersList A list of integers.
 * @return A list of tuples containing common values between the two input lists.
 */
fun intersectionTuplesLists(tuplesList: List<Pair<Int, String>>, numbersList: List<Int>): List<Pair<Int, String>> {
/**
 * Given a list of tuples and a list of numbers, return the intersection between the two using tuple unpacking
 * and list comprehension.
 *
 * @param tuplesList A list of tuples containing an integer and a string.
 * @param numbersList A list of integers.
 * @return A list of tuples containing common values between the two input lists.
 */
fun intersectionTuplesLists(tuplesList: List<Pair<Int, String>>, numbersList: List<Int>): List<Pair<Int, String>> {

    // Unpack the tuples using destructuring and check for intersection with numbers list using filter and map
    val intersection = tuplesList.filter { (num, _) -> num in numbersList }
                                 .map { it -> Pair(it.first, it.second) }

    return intersection
}