/**
 * Given a list representing economic data, modify the list based on specific conditions.
 *
 * @param economistList A list of economic data.
 * @param threshold A threshold value.
 * @return The modified economistList.
 */
fun modifyEconomistList(economistList: MutableList<Double>, threshold: Double): MutableList<Double> {

    for (i in economistList.indices) {
        val data = economistList[i]
        when {
            data > threshold -> economistList[i] = data * 2
            data < threshold -> economistList[i] = data / 2
            else -> economistList[i] = data
        }
    }
    return economistList
}
/**
 * Given a list representing economic data, modify the list based on specific conditions.
 *
 * @param economistList A list of economic data.
 * @param threshold A threshold value.
 * @return The modified economistList.
 */
fun modifyEconomistList(economistList: MutableList<Double>, threshold: Double): MutableList<Double> {
/**
 * Given a list representing economic data, modify the list based on specific conditions.
 *
 * @param economistList A list of economic data.
 * @param threshold A threshold value.
 * @return The modified economistList.
 */
fun modifyEconomistList(economistList: MutableList<Double>, threshold: Double): MutableList<Double> {

    for (i in economistList.indices) {
        val data = economistList[i]
        when {
            data > threshold -> economistList[i] = data * 2
            data < threshold -> economistList[i] = data / 2
            else -> economistList[i] = data
        }
    }
    return economistList
}