caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
To: Su Zhang <westlifezs@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] a question bout exetract a sub-element of element in	triple
Date: Sun, 22 Feb 2009 23:04:12 +0100	[thread overview]
Message-ID: <49A1CBDC.1050205@univ-savoie.fr> (raw)
In-Reply-To: <e2842950902221356o35c3fd3s8d0dbbc0a4152e16@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1554 bytes --]

Su Zhang a écrit :
> 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)=z", so is there a way
> I can get out "1" from "(0,2,[1,2,3])"? if possible, would you please
> give me some advices?
>  
> thank you very much
List.hd (third(0,2,[1;2;3])) ?

[1,2,3], is a one element list ...

Cheers,
Christophe

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


-- 
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 
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------


[-- Attachment #1.2: Christophe_Raffalli.vcf --]
[-- Type: text/x-vcard, Size: 310 bytes --]

begin:vcard
fn:Christophe Raffalli
n:Raffalli;Christophe
org:LAMA (UMR 5127)
email;internet:christophe.raffalli@univ-savoie.fr
title;quoted-printable:Ma=C3=AEtre de conf=C3=A9rences
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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

  reply	other threads:[~2009-02-22 22:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-22 21:56 Su Zhang
2009-02-22 22:04 ` Christophe Raffalli [this message]
2009-02-23  9:39 ` [Caml-list] " Florent Ouchet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49A1CBDC.1050205@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=westlifezs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).