/**
 * Determines the sum of the values that are common to both sets of numbers.
 *
 * @param economistList1 Set of integer numbers.
 * @param economistList2 Set of integer numbers.
 * @return Sum of the values that are found in both sets.
 */
fun intersectionSum(economistList1: Set<Int>, economistList2: Set<Int>): Int {

    val commonValues = economistList1.intersect(economistList2)  // Identifying common values
    
    var result = 0  // Variable to store the sum
    
    // Loop through common values set to calculate the sum
    for (value in commonValues) {
        result += value
    }
    
    return result
}
/**
 * Determines the sum of the values that are common to both sets of numbers.
 *
 * @param economistList1 Set of integer numbers.
 * @param economistList2 Set of integer numbers.
 * @return Sum of the values that are found in both sets.
 */
fun intersectionSum(economistList1: Set<Int>, economistList2: Set<Int>): Int {
/**
 * Determines the sum of the values that are common to both sets of numbers.
 *
 * @param economistList1 Set of integer numbers.
 * @param economistList2 Set of integer numbers.
 * @return Sum of the values that are found in both sets.
 */
fun intersectionSum(economistList1: Set<Int>, economistList2: Set<Int>): Int {

    val commonValues = economistList1.intersect(economistList2)  // Identifying common values
    
    var result = 0  // Variable to store the sum
    
    // Loop through common values set to calculate the sum
    for (value in commonValues) {
        result += value
    }
    
    return result
}