/**
 * This function finds the intersection of two lists.
 *
 * @param selectionList A list of elements
 * @param loopList Another list of elements
 * @return A list containing the common elements found in both lists
 */
fun intersection(selectionList: List<Any>, loopList: List<Any>): List<Any> {

    val result = mutableListOf<Any>()

    // Iterate through each element in the selection list
    for (element in selectionList) {
        // Check if the current element is present in the loop list
        if (element in loopList) {
            // Append the common element to the result list
            result.add(element)
        }
    }

    return result
}
/**
 * This function finds the intersection of two lists.
 *
 * @param selectionList A list of elements
 * @param loopList Another list of elements
 * @return A list containing the common elements found in both lists
 */
fun intersection(selectionList: List<Any>, loopList: List<Any>): List<Any> {
/**
 * This function finds the intersection of two lists.
 *
 * @param selectionList A list of elements
 * @param loopList Another list of elements
 * @return A list containing the common elements found in both lists
 */
fun intersection(selectionList: List<Any>, loopList: List<Any>): List<Any> {

    val result = mutableListOf<Any>()

    // Iterate through each element in the selection list
    for (element in selectionList) {
        // Check if the current element is present in the loop list
        if (element in loopList) {
            // Append the common element to the result list
            result.add(element)
        }
    }

    return result
}