From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id D0D4ABBAF for ; Sun, 22 Feb 2009 23:04:26 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmIDAGVaoUnUGyoDlGdsb2JhbACBbIsih00BAQEBCQsIGgO+eoQPBg X-IronPort-AV: E=Sophos;i="4.38,251,1233529200"; d="asc'?vcf'?scan'208";a="23349979" Received: from smtp3-g21.free.fr ([212.27.42.3]) by mail3-smtp-sop.national.inria.fr with ESMTP; 22 Feb 2009 23:04:24 +0100 Received: from smtp3-g21.free.fr (localhost [127.0.0.1]) by smtp3-g21.free.fr (Postfix) with ESMTP id 9E61C818130; Sun, 22 Feb 2009 23:04:19 +0100 (CET) Received: from Tocksi.local (lns-bzn-48f-81-56-220-129.adsl.proxad.net [81.56.220.129]) by smtp3-g21.free.fr (Postfix) with ESMTP id 7351B8180A9; Sun, 22 Feb 2009 23:04:16 +0100 (CET) Message-ID: <49A1CBDC.1050205@univ-savoie.fr> Date: Sun, 22 Feb 2009 23:04:12 +0100 From: Christophe Raffalli User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Su Zhang Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] a question bout exetract a sub-element of element in triple References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF4CD5DABC0A67E76DA4B6CD1" X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 advices:01 cheers:01 beginner's:01 ocaml:01 bug:01 chablais:01 73376:01 univ-savoie:01 beginners:01 lama:01 X-Attachments: cset="utf-8" name="Christophe_Raffalli.vcf" name="Christophe_Raffalli.vcf" type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF4CD5DABC0A67E76DA4B6CD1 Content-Type: multipart/mixed; boundary="------------090403070304080905010902" This is a multi-part message in MIME format. --------------090403070304080905010902 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Su Zhang a =E9crit : > I encountered a new problem which is I want to get " 1 " from a triple > "(0,2,[1,2,3])", which means I want to get the first value of the > third item in one triple and itself is a list, but when I use the > List.hd (third(0,2,[1,2,3])), it will give me the entire list which is > [1,2,3] > the definition of the third is "let third(x,y,z)=3Dz", so is there a wa= y > I can get out "1" from "(0,2,[1,2,3])"? if possible, would you please > give me some advices? > =20 > thank you very much List.hd (third(0,2,[1;2;3])) ? [1,2,3], is a one element list ... Cheers, Christophe > > --=20 > Su Zhang > -----------------------------------------------------------------------= - > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > =20 --=20 Christophe Raffalli Universite de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tel: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution=20 can check this signature. The public key is stored on www.keyserver.net --------------------------------------------- --------------090403070304080905010902 Content-Type: text/x-vcard; charset=utf-8; name="Christophe_Raffalli.vcf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Christophe_Raffalli.vcf" begin:vcard fn:Christophe Raffalli n:Raffalli;Christophe org:LAMA (UMR 5127) email;internet:christophe.raffalli@univ-savoie.fr title;quoted-printable:Ma=3DC3=3DAEtre de conf=3DC3=3DA9rences tel;work:+33 4 79 75 81 03 note:http://www.lama.univ-savoie.fr/~raffalli x-mozilla-html:TRUE version:2.1 end:vcard --------------090403070304080905010902-- --------------enigF4CD5DABC0A67E76DA4B6CD1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJocvfi9jr/RgYAS4RAjK4AKCub9zMUqnxGvDGX81xdas9PKyhDwCeOvN+ Qyk1/P733/p+eW/USIxoyRw= =632A -----END PGP SIGNATURE----- --------------enigF4CD5DABC0A67E76DA4B6CD1--