Question: Complete function in Ocaml (* Merge sorted lists l1 and l2 based on cmp. The result is a sorted list containing all elements from both
Complete function in Ocaml
(* Merge sorted lists l1 and l2 based on cmp. The result is a sorted
list containing all elements from both l2 and l2. *)
let rec merge (cmp : 'a->'a->bool) (l1 : 'a list) (l2 : 'a list) : 'a list =
(* TODO, replace [] *)
[]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
