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