/**
 * Takes a list of inflation rates and returns a triple containing the sum, minimum, and maximum of the rates.
 *
 * @param inflationRates List of inflation rates
 * @return Triple containing the sum, minimum, and maximum of the inflation rates
 *
 * Example:
 * addInflationRates(listOf(2.1, 1.5, 2.8, 3.6, 2.4)) // Output: Triple(12.4, 1.5, 3.6)
 */
fun addInflationRates(inflationRates: List<Double>): Triple<Double, Double, Double> {

    val sumRates = inflationRates.sum()
    val minRate = inflationRates.minOrNull() ?: 0.0
    val maxRate = inflationRates.maxOrNull() ?: 0.0
    return Triple(sumRates, minRate, maxRate)
}
/**
 * Takes a list of inflation rates and returns a triple containing the sum, minimum, and maximum of the rates.
 *
 * @param inflationRates List of inflation rates
 * @return Triple containing the sum, minimum, and maximum of the inflation rates
 *
 * Example:
 * addInflationRates(listOf(2.1, 1.5, 2.8, 3.6, 2.4)) // Output: Triple(12.4, 1.5, 3.6)
 */
fun addInflationRates(inflationRates: List<Double>): Triple<Double, Double, Double> {
/**
 * Takes a list of inflation rates and returns a triple containing the sum, minimum, and maximum of the rates.
 *
 * @param inflationRates List of inflation rates
 * @return Triple containing the sum, minimum, and maximum of the inflation rates
 *
 * Example:
 * addInflationRates(listOf(2.1, 1.5, 2.8, 3.6, 2.4)) // Output: Triple(12.4, 1.5, 3.6)
 */
fun addInflationRates(inflationRates: List<Double>): Triple<Double, Double, Double> {

    val sumRates = inflationRates.sum()
    val minRate = inflationRates.minOrNull() ?: 0.0
    val maxRate = inflationRates.maxOrNull() ?: 0.0
    return Triple(sumRates, minRate, maxRate)
}