/**
 * This function takes an athlete and a list of positions. It returns a boolean value indicating whether the athlete
 * is skilled in all the given positions.
 *
 * @param athlete The athlete to evaluate
 * @param positions List of positions to check
 * @return True if athlete is skilled in all given positions, False otherwise
 */
fun intersectionLogic(athlete: Map<String, Any>, positions: List<String>): Boolean {

    // Check if positions list is empty
    if (positions.isEmpty()) {
        return false
    }

    // Iterate over each position
    for (position in positions) {
        // Return false if position is not in the athlete's skills
        if (position !in athlete["skills"] as List<String>) {
            return false
        }
    }

    // Return true if athlete has skills in all positions
    return true
}

val athlete = mapOf(
    "name" to "John",
    "age" to 25,
    "skills" to listOf("forward", "midfielder", "goalkeeper")
)
/**
 * This function takes an athlete and a list of positions. It returns a boolean value indicating whether the athlete
 * is skilled in all the given positions.
 *
 * @param athlete The athlete to evaluate
 * @param positions List of positions to check
 * @return True if athlete is skilled in all given positions, False otherwise
 */
fun intersectionLogic(athlete: Map<String, Any>, positions: List<String>): Boolean {
/**
 * This function takes an athlete and a list of positions. It returns a boolean value indicating whether the athlete
 * is skilled in all the given positions.
 *
 * @param athlete The athlete to evaluate
 * @param positions List of positions to check
 * @return True if athlete is skilled in all given positions, False otherwise
 */
fun intersectionLogic(athlete: Map<String, Any>, positions: List<String>): Boolean {

    // Check if positions list is empty
    if (positions.isEmpty()) {
        return false
    }

    // Iterate over each position
    for (position in positions) {
        // Return false if position is not in the athlete's skills
        if (position !in athlete["skills"] as List<String>) {
            return false
        }
    }

    // Return true if athlete has skills in all positions
    return true
}

val athlete = mapOf(
    "name" to "John",
    "age" to 25,
    "skills" to listOf("forward", "midfielder", "goalkeeper")
)