/**
 * Given a set of expenses and a tax rate, calculate the total tax deductions.
 *
 * @param expenses A set of expenses as integers or floats.
 * @param taxRate The tax rate as a float (e.g., 0.2 for 20%).
 * @return The total tax deductions as a float.
 */
fun calculateTaxDeductions(expenses: Set<Double>, taxRate: Double): Double {

    var deductions = 0.0

    // Iterate over each expense and calculate the tax deduction
    for (expense in expenses) {
        deductions += expense * taxRate
    }

    return deductions
}
/**
 * Given a set of expenses and a tax rate, calculate the total tax deductions.
 *
 * @param expenses A set of expenses as integers or floats.
 * @param taxRate The tax rate as a float (e.g., 0.2 for 20%).
 * @return The total tax deductions as a float.
 */
fun calculateTaxDeductions(expenses: Set<Double>, taxRate: Double): Double {
/**
 * Given a set of expenses and a tax rate, calculate the total tax deductions.
 *
 * @param expenses A set of expenses as integers or floats.
 * @param taxRate The tax rate as a float (e.g., 0.2 for 20%).
 * @return The total tax deductions as a float.
 */
fun calculateTaxDeductions(expenses: Set<Double>, taxRate: Double): Double {

    var deductions = 0.0

    // Iterate over each expense and calculate the tax deduction
    for (expense in expenses) {
        deductions += expense * taxRate
    }

    return deductions
}