/**
 * You are an accountant and you need to split a list of transactions into two categories:
 * 1. Expenses: transactions with negative amounts.
 * 2. Incomes: transactions with positive amounts.
 *
 * You need to use set comprehension in order to create separate sets for expenses and incomes.
 *
 * @param transactions A list of transactions (represented as floating-point numbers).
 * @return A Pair containing the set of expenses and the set of incomes, respectively.
 */
fun splitExpenses(transactions: List<Double>): Pair<Set<Double>, Set<Double>> {

    // Use set comprehension to create a set of expenses
    val expenses = transactions.filter { it < 0.0 }.toSet()

    // Use set comprehension to create a set of incomes
    val incomes = transactions.filter { it >= 0.0 }.toSet()

    return Pair(expenses, incomes)
}
/**
 * You are an accountant and you need to split a list of transactions into two categories:
 * 1. Expenses: transactions with negative amounts.
 * 2. Incomes: transactions with positive amounts.
 *
 * You need to use set comprehension in order to create separate sets for expenses and incomes.
 *
 * @param transactions A list of transactions (represented as floating-point numbers).
 * @return A Pair containing the set of expenses and the set of incomes, respectively.
 */
fun splitExpenses(transactions: List<Double>): Pair<Set<Double>, Set<Double>> {
/**
 * You are an accountant and you need to split a list of transactions into two categories:
 * 1. Expenses: transactions with negative amounts.
 * 2. Incomes: transactions with positive amounts.
 *
 * You need to use set comprehension in order to create separate sets for expenses and incomes.
 *
 * @param transactions A list of transactions (represented as floating-point numbers).
 * @return A Pair containing the set of expenses and the set of incomes, respectively.
 */
fun splitExpenses(transactions: List<Double>): Pair<Set<Double>, Set<Double>> {

    // Use set comprehension to create a set of expenses
    val expenses = transactions.filter { it < 0.0 }.toSet()

    // Use set comprehension to create a set of incomes
    val incomes = transactions.filter { it >= 0.0 }.toSet()

    return Pair(expenses, incomes)
}