let rec inter s1 s2 = match s1 with [] -> [] | e::s1' -> if (List.mem e s2) then (e::(inter s1' s2)) else (inter s1' s2)