reverse a list. is this a good solution

"Roelof Wobben [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
Hello,

I try the 99 ocaml problems and have solved the reverse a list problem.

My solution looks like this :

let rec test l1 l2 =
     match l1 with
     | [] -> l2
     | h :: t -> test t (h::l2)
  ;;

Is this a good way to solve it or are there things that can be better ?

Roelof
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.