From: Richard J. <ri...@an...> - 2004-12-16 13:46:18
|
On Thu, Dec 16, 2004 at 12:03:24PM +0000, Richard Jones wrote: > let rec uniq ?(cmp =3D Pervasives.compare) =3D function > [] -> [] > | [x] -> [x] > | x :: y :: xs when compare x y =3D 0 -> > uniq (x :: xs) > | x :: y :: xs -> > x :: uniq (y :: xs) This function is somewhat broken w.r.t its handling of the optional ?cmp argument, but I hope you understood what I meant to do ... Rich. --=20 Richard Jones. http://www.annexia.org/ http://www.j-london.com/ >>> http://www.team-notepad.com/ - collaboration tools for teams <<< Merjis Ltd. http://www.merjis.com/ - improving website return on investment Write Apache modules in OCaml - http://www.merjis.com/developers/mod_caml |