reverse a list. is this a good solution
| 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