It filters the first list by membership in the second list, retaining the order and all repetitions of qualifying entries in the first list. For example,
mystery3([3, 1, 3, 2], [3, 4]) returns [3, 3]. Thus it is related to set intersection, but its result is a list and does not discard repeated elements. Articles by others on the same topic
There are currently no matching articles.