/**
 * This exercise is designed to test your understanding of the intersection of the 'range' function
 * and creating lists with initial elements.
 *
 * Given a start and end value, you need to create a list using the 'range' function. The list should
 * consist of numbers within the given range. However, you need to remove any numbers from the list that
 * are also found in the initial_elements list.
 *
 * Your task is to complete the code below to solve this exercise. Good luck!
 *
 * @param start the starting value of the range (inclusive)
 * @param end the ending value of the range (exclusive)
 * @param initialElements a list of initial values
 * @return A list containing numbers within the range (start, end), excluding any numbers found in initialElements.
 */
fun listIntersection(start: Int, end: Int, initialElements: List<Int>): List<Int> {

    // Create a list using the range function, with numbers from start to end
    val numbersList = (start until end).toList()

    // Remove any numbers from the numbersList that are also present in the initialElements list
    return numbersList.filter { it !in initialElements }
}
/**
 * This exercise is designed to test your understanding of the intersection of the 'range' function
 * and creating lists with initial elements.
 *
 * Given a start and end value, you need to create a list using the 'range' function. The list should
 * consist of numbers within the given range. However, you need to remove any numbers from the list that
 * are also found in the initial_elements list.
 *
 * Your task is to complete the code below to solve this exercise. Good luck!
 *
 * @param start the starting value of the range (inclusive)
 * @param end the ending value of the range (exclusive)
 * @param initialElements a list of initial values
 * @return A list containing numbers within the range (start, end), excluding any numbers found in initialElements.
 */
fun listIntersection(start: Int, end: Int, initialElements: List<Int>): List<Int> {
/**
 * This exercise is designed to test your understanding of the intersection of the 'range' function
 * and creating lists with initial elements.
 *
 * Given a start and end value, you need to create a list using the 'range' function. The list should
 * consist of numbers within the given range. However, you need to remove any numbers from the list that
 * are also found in the initial_elements list.
 *
 * Your task is to complete the code below to solve this exercise. Good luck!
 *
 * @param start the starting value of the range (inclusive)
 * @param end the ending value of the range (exclusive)
 * @param initialElements a list of initial values
 * @return A list containing numbers within the range (start, end), excluding any numbers found in initialElements.
 */
fun listIntersection(start: Int, end: Int, initialElements: List<Int>): List<Int> {

    // Create a list using the range function, with numbers from start to end
    val numbersList = (start until end).toList()

    // Remove any numbers from the numbersList that are also present in the initialElements list
    return numbersList.filter { it !in initialElements }
}