English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Facing syntax error.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-14 (22:47)
From: Bhavik Gandhi (hotmail) <bhavik_gandhi@h...>
Subject: [Caml-list] Facing syntax error.
Hi friends,
I am a novice to the OCAML language. I am trying to write a small
program and I am facing with a syntax error, any help will be
let rec undup lst = try match lst with
  |h::tail -> match tail with
  |h::xt -> if (h=List.hd xt) then h::undup xt
  else raise(Failure "ERROR-Your list does not contain duplicates");;
Error: line 6, characters 67-69
Syntax error.
Bhavik Gandhi