Question: Cannot use Haskell functions. Must implement the function recursively as well! This is SO CONFUSING Write a function intersect that takes two lists and returns
Cannot use Haskell functions. Must implement the function recursively as well! This is SO CONFUSING

Write a function intersect that takes two lists and returns the intersection of two lists. If either list contains duplicate entries the output may contain duplicates as well (if appropriate). If you function does not produce duplicates, even if they are present, it will earn 2 bonus points. For example: intersect [1] [1] -> [1] intersect [1, 2, 3] [1, 2] intersect [ [1, 2, 3], [1, -> 2], [1, 2] [2, 3] ] [ [1], [2, 3] ] -> [[2,3]]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
