<?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/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"
  prev="2003/11/3f08d78ebc6b3a7418e575aaec0e88e8"
  next="2003/11/bacc85928dbd73f2643743fc792e3b9b"
  prev-in-thread="2003/11/b1b6c26b87180e07925fada95fea49cd"
  next-in-thread="2003/11/3f08d78ebc6b3a7418e575aaec0e88e8"
  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>
YES! Thanks for information.

On 10:13 Mon 17 Nov     , Richard Jones wrote:
&gt; On Mon, Nov 17, 2003 at 11:52:49AM +0300, Selentek 24331-03 wrote:
&gt; [...]
&gt; 
&gt; Like this?
&gt; 
&gt; # let f ?v () =
&gt;   match v with
&gt;   | Some i -&gt; i + 1
&gt;   | None   -&gt; 0      ;;
&gt; val f : ?v:int -&gt; unit -&gt; int = &lt;fun&gt;
&gt; 
&gt; # let v = Some 1;;
&gt; val v : int option = Some 1
&gt; 
&gt; # f ?v ();;
&gt; - : int = 2
&gt; 
&gt; # let v = None;;
&gt; val v : 'a option = None
&gt; 
&gt; # f ?v ();;
&gt; - : int = 0
&gt; 
&gt; Rich.
&gt; 
&gt; -- 
&gt; Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
&gt; Merjis Ltd. http://www.merjis.com/ - improving website return on investment
&gt; MONOLITH is an advanced framework for writing web applications in C, easier
&gt; than using Perl &amp; Java, much faster and smaller, reusable widget-based arch,
&gt; database-backed, discussion, chat, calendaring:
&gt; http://www.annexia.org/freeware/monolith/

-- 
Gentoo Linux http://www.gentoo.org

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

