caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Facing syntax error.
@ 2003-10-15  2:49 Bhavik Gandhi (hotmail)
  2003-10-14 23:38 ` Matt Gushee
  2003-10-15  7:51 ` Stefano Zacchiroli
  0 siblings, 2 replies; 3+ messages in thread
From: Bhavik Gandhi (hotmail) @ 2003-10-15  2:49 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

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
appreciated
 
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

[-- Attachment #2: Type: text/html, Size: 5914 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-15  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15  2:49 [Caml-list] Facing syntax error Bhavik Gandhi (hotmail)
2003-10-14 23:38 ` Matt Gushee
2003-10-15  7:51 ` Stefano Zacchiroli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).