/**
 * This function takes a list of economists and modifies their salary using a list comprehension
 * and nested if statements.
 *
 * @param economists a list of pairs containing the name and current salary of each economist
 * @return a new list of pairs containing the name and modified salary of each economist
 */
fun modifySalary(economists: List<Pair<String, Int>>): List<Pair<String, Int>> {

    // Modify the salary using a list comprehension and nested if statements
    val modifiedSalaries = economists.map { (name, salary) ->
        when {
            salary < 50000 -> name to (salary + 5000)
            salary < 100000 -> name to (salary + 3000)
            else -> name to (salary + 1000)
        }
    }
    return modifiedSalaries
}
/**
 * This function takes a list of economists and modifies their salary using a list comprehension
 * and nested if statements.
 *
 * @param economists a list of pairs containing the name and current salary of each economist
 * @return a new list of pairs containing the name and modified salary of each economist
 */
fun modifySalary(economists: List<Pair<String, Int>>): List<Pair<String, Int>> {
/**
 * This function takes a list of economists and modifies their salary using a list comprehension
 * and nested if statements.
 *
 * @param economists a list of pairs containing the name and current salary of each economist
 * @return a new list of pairs containing the name and modified salary of each economist
 */
fun modifySalary(economists: List<Pair<String, Int>>): List<Pair<String, Int>> {

    // Modify the salary using a list comprehension and nested if statements
    val modifiedSalaries = economists.map { (name, salary) ->
        when {
            salary < 50000 -> name to (salary + 5000)
            salary < 100000 -> name to (salary + 3000)
            else -> name to (salary + 1000)
        }
    }
    return modifiedSalaries
}