/**
 * A function to remove elements from a given set that are present in a given exclude list.
 *
 * @param numberSet A set containing numbers represented on a number line.
 * @param excludeList A list containing numbers to be excluded from the number set.
 * @return A new set with excluded elements removed from the original number set.
 */
fun removeElements(numberSet: Set<Int>, excludeList: List<Int>): Set<Int> {

    // Validate the input arguments
    require(numberSet is Set<Int>) { "The numberSet argument must be of type Set<Int>!" }
    require(excludeList is List<Int>) { "The excludeList argument must be of type List<Int>!" }

    // Initialize an empty set to store the result
    val resultSet = mutableSetOf<Int>()

    // Iterate over the elements in the number set
    for (num in numberSet) {
        var exclude = false

        // Check if the current element should be excluded
        for (excludeNum in excludeList) {
            if (num == excludeNum) {
                exclude = true
                break
            }
        }
        if (!exclude) {
            resultSet.add(num)
        }
    }

    return resultSet
}
/**
 * A function to remove elements from a given set that are present in a given exclude list.
 *
 * @param numberSet A set containing numbers represented on a number line.
 * @param excludeList A list containing numbers to be excluded from the number set.
 * @return A new set with excluded elements removed from the original number set.
 */
fun removeElements(numberSet: Set<Int>, excludeList: List<Int>): Set<Int> {
/**
 * A function to remove elements from a given set that are present in a given exclude list.
 *
 * @param numberSet A set containing numbers represented on a number line.
 * @param excludeList A list containing numbers to be excluded from the number set.
 * @return A new set with excluded elements removed from the original number set.
 */
fun removeElements(numberSet: Set<Int>, excludeList: List<Int>): Set<Int> {

    // Validate the input arguments
    require(numberSet is Set<Int>) { "The numberSet argument must be of type Set<Int>!" }
    require(excludeList is List<Int>) { "The excludeList argument must be of type List<Int>!" }

    // Initialize an empty set to store the result
    val resultSet = mutableSetOf<Int>()

    // Iterate over the elements in the number set
    for (num in numberSet) {
        var exclude = false

        // Check if the current element should be excluded
        for (excludeNum in excludeList) {
            if (num == excludeNum) {
                exclude = true
                break
            }
        }
        if (!exclude) {
            resultSet.add(num)
        }
    }

    return resultSet
}