Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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