/**
 * Given two lists, the function aims to find the intersection of the two lists,
 * i.e., the common elements that appear in both lists.
 *
 * @param list1 A list of linguistics terms
 * @param list2 A list of indexing terms
 * @return A list containing the common elements between the two input lists
 */
fun findCommonElements(list1: List<String>, list2: List<String>): List<String> {

    val commonElements = mutableListOf<String>()

    for (element in list1) {
        var found = false

        for (term in list2) {
            if (element == term) {
                commonElements.add(element)
                found = true
                break
            }
        }

        if (!found) {
            println("The element '$element' is not present in the second list.")
        }
    }

    return commonElements
}
/**
 * Given two lists, the function aims to find the intersection of the two lists,
 * i.e., the common elements that appear in both lists.
 *
 * @param list1 A list of linguistics terms
 * @param list2 A list of indexing terms
 * @return A list containing the common elements between the two input lists
 */
fun findCommonElements(list1: List<String>, list2: List<String>): List<String> {
/**
 * Given two lists, the function aims to find the intersection of the two lists,
 * i.e., the common elements that appear in both lists.
 *
 * @param list1 A list of linguistics terms
 * @param list2 A list of indexing terms
 * @return A list containing the common elements between the two input lists
 */
fun findCommonElements(list1: List<String>, list2: List<String>): List<String> {

    val commonElements = mutableListOf<String>()

    for (element in list1) {
        var found = false

        for (term in list2) {
            if (element == term) {
                commonElements.add(element)
                found = true
                break
            }
        }

        if (!found) {
            println("The element '$element' is not present in the second list.")
        }
    }

    return commonElements
}