From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA31778; Mon, 17 Nov 2003 11:54:03 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA31474 for ; Mon, 17 Nov 2003 11:54:02 +0100 (MET) Received: from ns.ntt.ru (ns.ntt.ru [195.28.32.3]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAHAs1117631 for ; Mon, 17 Nov 2003 11:54:01 +0100 (MET) Received: from ns.ntt.ru (root@localhost) by ns.ntt.ru (8.12.9/8.12.9) with SMTP id hAHAsCAC085592 for ; Mon, 17 Nov 2003 13:54:12 +0300 (MSK) From: Selentek 24331-03 Received: from inv_machine ([195.28.33.227]) by ns.ntt.ru (8.12.9/8.12.9) with ESMTP id hAHAsA7C085580; Mon, 17 Nov 2003 13:54:11 +0300 (MSK) Received: by inv_machine (Postfix, from userid 1000) id 186CC25EBF; Mon, 17 Nov 2003 13:44:00 +0300 (MSK) Date: Mon, 17 Nov 2003 13:44:00 +0300 To: Richard Jones Cc: Selentek 24331-03 , caml-list@inria.fr Subject: Re: [Caml-list] optional arguments Message-ID: <20031117104400.GA7975@inv_machine> References: <20031117085249.GA11793@inv_machine> <20031117101317.GA21166@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031117101317.GA21166@redhat.com> User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 val:01 val:01 freshmeat:01 ltd:98 int:01 int:01 nov:01 nov:01 match:02 arch:02 0300,:02 unit:03 wrote:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk YES! Thanks for information. On 10:13 Mon 17 Nov , Richard Jones wrote: > On Mon, Nov 17, 2003 at 11:52:49AM +0300, Selentek 24331-03 wrote: > [...] > > Like this? > > # let f ?v () = > match v with > | Some i -> i + 1 > | None -> 0 ;; > val f : ?v:int -> unit -> int = > > # let v = Some 1;; > val v : int option = Some 1 > > # f ?v ();; > - : int = 2 > > # let v = None;; > val v : 'a option = None > > # f ?v ();; > - : int = 0 > > Rich. > > -- > Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj > Merjis Ltd. http://www.merjis.com/ - improving website return on investment > MONOLITH is an advanced framework for writing web applications in C, easier > than using Perl & Java, much faster and smaller, reusable widget-based arch, > database-backed, discussion, chat, calendaring: > 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