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 HAA29114; Tue, 23 Dec 2003 07:47:10 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA28833 for ; Tue, 23 Dec 2003 07:47:07 +0100 (MET) Received: from mz3.forethought.net (mzpi5.forethought.net [216.241.36.14]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hBN6j4v18178 for ; Tue, 23 Dec 2003 07:47:07 +0100 (MET) Received: from [216.241.35.41] (helo=swordfish) by mz3.forethought.net with esmtp (Exim 4.14) id 1AZ5YZ-0004rh-KT for caml-list@pauillac.inria.fr; Wed, 24 Dec 2003 02:43:55 -0700 Received: from matt by swordfish with local (Exim 3.35 #1 (Debian)) id 1AYgG9-00014E-00 for ; Mon, 22 Dec 2003 23:43:13 -0700 Date: Mon, 22 Dec 2003 23:43:13 -0700 From: Matt Gushee To: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] Frustrated Beginner Message-ID: <20031223064313.GC1145@swordfish> Reply-To: Matt Gushee Mail-Followup-To: caml-list@pauillac.inria.fr References: <1072152186.59938.30.camel@tylere> <29911.24.6.3.124.1072153159.squirrel@www.cs.fiu.edu> <1072152186.59938.30.camel@tylere> <20031223053451.GB1145@swordfish> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; gushee:01 mgushee:01 havenrock:01 caml-list:01 foo:01 endline:01 endline:01 foo:01 abcde:01 abcde:01 gushee:01 englewood:01 manure:01 mgushee:01 havenrock:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Dec 23, 2003 at 01:11:08AM -0500, Tyler Eaves wrote: > > match foo with > > | None -> print_endline "Nothing"; "" > > | Some x -> print_endline x; x > > If I understand the match syntax correctly, in this case, x takes the > value of foo? Not quite. foo can have a value of either None or Some s, where s is an arbitrary string. So if foo has a value of Some "abcde", then x = "abcde". Foo, by the way, has a type of string option. -- Matt Gushee When a nation follows the Way, Englewood, Colorado, USA Horses bear manure through mgushee@havenrock.com its fields; http://www.havenrock.com/ When a nation ignores the Way, Horses bear soldiers through its streets. --Lao Tzu (Peter Merel, trans.) ------------------- 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