Re: "ocaml_beginners"::[] tail recursion
Jon Harrop wrote:
> let rec rev_append l1 l2 =
> match l1, l2 with
> | [], l2 -> l2
> | hd::tl, l2 -> rev_append tl (hd::l2);;
Or, less verbosely...
let rec rev_append l1 l2 =
match l1 with
| [] -> l2
| hd::tl -> rev_append tl (hd::l2);;