<?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/11/3f08d78ebc6b3a7418e575aaec0e88e8"
  from="Artem Prisyznuk &lt;tema@s...&gt;"
  author="Artem Prisyznuk"
  date="2003-11-17T10:13:21"
  subject="Re: [Caml-list] optional arguments"
  prev="2003/11/b1b6c26b87180e07925fada95fea49cd"
  next="2003/11/663dd68fbee6d9f1a5b166cb1c70b6aa"
  prev-in-thread="2003/11/663dd68fbee6d9f1a5b166cb1c70b6aa"
  next-in-thread="2003/11/80f6a150cec1a35aec3601f9b5fe1fa8"
  prev-thread="2003/11/00a00848651aca38fdc564b10fb3733f"
  next-thread="2003/11/bacc85928dbd73f2643743fc792e3b9b"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] optional arguments">
<msg 
  url="2003/11/5d3e596b74eaa9ee75a58da8d20cd9d9"
  from="Selentek 24331-03 &lt;epifanov@k...&gt;"
  author="Selentek 24331-03"
  date="2003-11-17T09:03:00"
  subject="[Caml-list] optional arguments">
<msg 
  url="2003/11/b1b6c26b87180e07925fada95fea49cd"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2003-11-17T10:13:28"
  subject="Re: [Caml-list] optional arguments">
<msg 
  url="2003/11/663dd68fbee6d9f1a5b166cb1c70b6aa"
  from="Selentek 24331-03 &lt;epifanov@k...&gt;"
  author="Selentek 24331-03"
  date="2003-11-17T10:54:03"
  subject="Re: [Caml-list] optional arguments">
</msg>
</msg>
<msg 
  url="2003/11/3f08d78ebc6b3a7418e575aaec0e88e8"
  from="Artem Prisyznuk &lt;tema@s...&gt;"
  author="Artem Prisyznuk"
  date="2003-11-17T10:13:21"
  subject="Re: [Caml-list] optional arguments">
</msg>
<msg 
  url="2003/11/80f6a150cec1a35aec3601f9b5fe1fa8"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2003-11-17T16:24:50"
  subject="Re: [Caml-list] optional arguments">
</msg>
</msg>
</thread>

<contents>
On Mon, 17 Nov 2003 11:52:49 +0300, Selentek 24331-03 &lt;epifanov@komset.ru&gt; 
wrote:

&gt; Is there any way to "send optional argument with None value".

f ?v:a ();;


&gt; let a = None;;
&gt; val a : 'a option = None
&gt;
&gt; let f ?v () =
&gt;   match v with
&gt;   | Some i -&gt; i + 1
&gt;   | None   -&gt; 0



-- 
Artem Prysyznuk
tema@sit.kiev.ua

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

