Можно ли это оптимизировать?
let rec intersectionCollect f l1 l2 =
l1 |> List.collect (fun el1 ->
l2 |> List.collect (fun el2 ->
match f el1 el2 with
| Some(res) -> [res]
| None -> []))