let rec communs xs ys = match xs,ys with | [],_ -> [] | _,[] -> [] | x::rx, y::ry -> if x < y then communs rx ys else if y < x then communs xs ry else (* x=y *) x::communs rx ry ;; |
let rec communs xs ys = match xs with | [] -> [] | x::rx -> match ys with | [] -> [] | y::ry -> … |