Hi all,
is there an OCaml equivalent to Haskell's pattern matching on an arbitrary number of arguments? For example, can I have something resembling:
merge [] lst = lst
merge lst [] = lst
merge l1 @ (n : ns) l2 @ (m : ms) =
if n < m then n : merge ns l2 else m : merge l1 ms
(The example's lifted from Developing Applications with Objective Caml :)
Thanks.