/**
 * The function takes two lists as input and finds the intersection of the two lists using list comprehension.
 *
 * @param l1 First list
 * @param l2 Second list
 * @return A list containing elements that are common to both input lists.
 *
 * Example:
 * intersection(listOf(1, 2, 3, 4), listOf(3, 4, 5, 6)) // [3, 4]
 */
fun intersection(l1: List<Int>, l2: List<Int>): List<Int> {

    return l1.filter { it in l2 }
}
/**
 * The function takes two lists as input and finds the intersection of the two lists using list comprehension.
 *
 * @param l1 First list
 * @param l2 Second list
 * @return A list containing elements that are common to both input lists.
 *
 * Example:
 * intersection(listOf(1, 2, 3, 4), listOf(3, 4, 5, 6)) // [3, 4]
 */
fun intersection(l1: List<Int>, l2: List<Int>): List<Int> {
/**
 * The function takes two lists as input and finds the intersection of the two lists using list comprehension.
 *
 * @param l1 First list
 * @param l2 Second list
 * @return A list containing elements that are common to both input lists.
 *
 * Example:
 * intersection(listOf(1, 2, 3, 4), listOf(3, 4, 5, 6)) // [3, 4]
 */
fun intersection(l1: List<Int>, l2: List<Int>): List<Int> {

    return l1.filter { it in l2 }
}