<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/10/3557909eb406de5c9c556ee445b3095e"
  from="Bhavik Gandhi (hotmail) &lt;bhavik_gandhi@h...&gt;"
  author="Bhavik Gandhi (hotmail)"
  date="2003-10-14T22:47:27"
  subject="[Caml-list] Facing syntax error."
  prev="2003/10/48561de698e6c05397123c5888cc4dc1"
  next="2003/10/94157d29f1220115827324f5a29e1d61"
  next-in-thread="2003/10/94157d29f1220115827324f5a29e1d61"
  prev-thread="2003/10/9235eab2ffb969edc09cc15e9dfea256"
  next-thread="2003/10/0c272dd5bfb35ce29fe72630db24b26f"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Facing syntax error.">
<msg 
  url="2003/10/3557909eb406de5c9c556ee445b3095e"
  from="Bhavik Gandhi (hotmail) &lt;bhavik_gandhi@h...&gt;"
  author="Bhavik Gandhi (hotmail)"
  date="2003-10-14T22:47:27"
  subject="[Caml-list] Facing syntax error.">
<msg 
  url="2003/10/94157d29f1220115827324f5a29e1d61"
  from="Matt Gushee &lt;matt@g...&gt;"
  author="Matt Gushee"
  date="2003-10-14T23:38:11"
  subject="Re: [Caml-list] Facing syntax error.">
</msg>
<msg 
  url="2003/10/40efc6d7a09a9588ce9fc3fe42b29f4e"
  from="Stefano Zacchiroli &lt;zack@b...&gt;"
  author="Stefano Zacchiroli"
  date="2003-10-15T07:51:13"
  subject="Re: [Caml-list] Facing syntax error.">
</msg>
</msg>
</thread>

<contents>
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
  |[]-&gt;[]
  |h::tail -&gt; match tail with
  |[]-&gt;[]
  |h::xt -&gt; 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

</contents>

</message>

