/**
 * This function takes a list of clients and finds those who meet certain criteria.
 *
 * @param clientList A list of clients, where each client is a dictionary with the following keys:
 *                   - name (String): The client's name
 *                   - age (Int): The client's age
 *                   - income (Int): The client's income
 * @return A list of clients who meet the criteria
 */
fun findClients(clientList: List<Map<String, Any>>): List<Map<String, Any>> {

    val eligibleClients = mutableListOf<Map<String, Any>>()

    for (client in clientList) {
        if (client["age"] as Int in 18..65) {
            if (client["income"] as Int in 2000..5000) {
                if ((client["name"] as String).startsWith('A') || (client["name"] as String).startsWith('B')) {
                    eligibleClients.add(client)
                }
            }
        }
    }

    return eligibleClients
}
/**
 * This function takes a list of clients and finds those who meet certain criteria.
 *
 * @param clientList A list of clients, where each client is a dictionary with the following keys:
 *                   - name (String): The client's name
 *                   - age (Int): The client's age
 *                   - income (Int): The client's income
 * @return A list of clients who meet the criteria
 */
fun findClients(clientList: List<Map<String, Any>>): List<Map<String, Any>> {
/**
 * This function takes a list of clients and finds those who meet certain criteria.
 *
 * @param clientList A list of clients, where each client is a dictionary with the following keys:
 *                   - name (String): The client's name
 *                   - age (Int): The client's age
 *                   - income (Int): The client's income
 * @return A list of clients who meet the criteria
 */
fun findClients(clientList: List<Map<String, Any>>): List<Map<String, Any>> {

    val eligibleClients = mutableListOf<Map<String, Any>>()

    for (client in clientList) {
        if (client["age"] as Int in 18..65) {
            if (client["income"] as Int in 2000..5000) {
                if ((client["name"] as String).startsWith('A') || (client["name"] as String).startsWith('B')) {
                    eligibleClients.add(client)
                }
            }
        }
    }

    return eligibleClients
}