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 AAA27581; Mon, 22 Oct 2001 00:48:30 +0200 (MET DST) 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 AAA27699 for ; Mon, 22 Oct 2001 00:48:29 +0200 (MET DST) Received: from smtprt15.wanadoo.fr (smtprt15.wanadoo.fr [193.252.19.210]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f9LMmTn06297 for ; Mon, 22 Oct 2001 00:48:29 +0200 (MET DST) Received: from villosa.wanadoo.fr (193.252.19.122) by smtprt15.wanadoo.fr; 22 Oct 2001 00:48:28 +0200 Received: from agent007st1 (193.253.187.248) by villosa.wanadoo.fr; 22 Oct 2001 00:48:25 +0200 Message-ID: <001401c15a82$d238a320$0a00a8c0@agent007st1> From: "AgEnT007" To: Subject: [Caml-list] =?iso-8859-1?Q?D=E9butant_:=29?= Date: Mon, 22 Oct 2001 00:50:45 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0011_01C15A93.956BD910" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_0011_01C15A93.956BD910 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Bonjour =E0 tous, je viens de me mettre cette apr=E9s midi m=EBme au language CAML et je = bute deja sur un exemple que j'ai trouv=E9 :) voici ce que j'ai: let rec exemple_1 f a l =3D if l =3D [] then a=20 else exemple_1 f ( f a (List.hd l)) (List.tl l) ;; j'ai compris l'utilit=E9 d'une telle declaration mais pas celle du < a > = qui se trouve =E0 la 3eme ligne. Quelqu'un pourrait t'il m'=E9clairer sur la troisieme ligne? Merci =E0 tous, bonne nuit Agent. ps: d=E9sol=E9 si je n'ai pas =E9t=E9 clair :) ------=_NextPart_000_0011_01C15A93.956BD910 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Bonjour =E0 tous,
je viens de me mettre cette apr=E9s midi m=EBme = au language=20 CAML et je bute deja sur un exemple que j'ai trouv=E9 :)
 
voici ce que j'ai:
 
let rec exemple_1 f a l =3D
if l = =3D [] then a=20
else exemple_1 f ( f a (List.hd l)) (List.tl l) ;;
 
j'ai compris l'utilit=E9 d'une telle declaration = mais pas=20 celle du < a > qui se trouve =E0 la 3eme ligne.
Quelqu'un pourrait t'il m'=E9clairer sur la = troisieme=20 ligne?
Merci =E0 tous, bonne nuit
 
Agent.
 
ps: d=E9sol=E9 si je n'ai pas =E9t=E9 clair=20 :)
------=_NextPart_000_0011_01C15A93.956BD910-- ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr 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 HAA30958; Mon, 22 Oct 2001 07:43:48 +0200 (MET DST) 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 HAA31157 for ; Mon, 22 Oct 2001 07:43:47 +0200 (MET DST) Received: from serveur1-1.labri.u-bordeaux.fr (serveur1-1.labri.u-bordeaux.fr [147.210.8.170]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f9M5hlH11198 for ; Mon, 22 Oct 2001 07:43:47 +0200 (MET DST) Received: (from vanicat@localhost) by serveur1-1.labri.u-bordeaux.fr (8.11.2/8.11.2) id f9M5hkG02163; Mon, 22 Oct 2001 07:43:46 +0200 X-Authentication-Warning: serveur1-1.labri.u-bordeaux.fr: vanicat set sender to vanicat@labri.u-bordeaux.fr using -f To: caml-list@inria.fr Subject: Re: [Caml-list] =?iso-8859-1?q?D=E9butant?= :) References: <001401c15a82$d238a320$0a00a8c0@agent007st1> From: Remi VANICAT In-Reply-To: <001401c15a82$d238a320$0a00a8c0@agent007st1> Date: 22 Oct 2001 07:43:46 +0200 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.104 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk "AgEnT007" writes: > Bonjour à tous, > je viens de me mettre cette aprés midi mëme au language CAML et je bute deja sur un exemple que j'ai trouvé :) > > voici ce que j'ai: > > let rec exemple_1 f a l = > if l = [] then a > else exemple_1 f ( f a (List.hd l)) (List.tl l) ;; > > j'ai compris l'utilité d'une telle declaration mais pas celle du > < a > qui se trouve à la 3eme ligne. > Quelqu'un pourrait t'il m'éclairer sur la troisieme ligne? si l = [1; 2; 3; 4; 5; 6; 7; 8; 9] alors exemple_1 f a l va calculer (f (f (f (f ... (f (f a 9) 8) ...4) 3) 2) 1) cette fonction a une utilité. J'espère que c'est clair.... -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr 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 IAA31431; Mon, 22 Oct 2001 08:04:24 +0200 (MET DST) 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 IAA31357 for ; Mon, 22 Oct 2001 08:04:23 +0200 (MET DST) Received: from serveur1-1.labri.u-bordeaux.fr (serveur1-1.labri.u-bordeaux.fr [147.210.8.170]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f9M64MH11390 for ; Mon, 22 Oct 2001 08:04:22 +0200 (MET DST) Received: (from vanicat@localhost) by serveur1-1.labri.u-bordeaux.fr (8.11.2/8.11.2) id f9M64LS02241; Mon, 22 Oct 2001 08:04:21 +0200 X-Authentication-Warning: serveur1-1.labri.u-bordeaux.fr: vanicat set sender to vanicat@labri.u-bordeaux.fr using -f To: caml-list@inria.fr Subject: Re: [Caml-list] =?iso-8859-1?q?D=E9butant?= :) References: <001401c15a82$d238a320$0a00a8c0@agent007st1> From: Remi VANICAT In-Reply-To: Date: 22 Oct 2001 08:04:21 +0200 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.104 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Remi VANICAT writes: > "AgEnT007" writes: > > > Bonjour à tous, > > je viens de me mettre cette aprés midi mëme au language CAML et je bute deja sur un exemple que j'ai trouvé :) > > > > voici ce que j'ai: > > > > let rec exemple_1 f a l = > > if l = [] then a > > else exemple_1 f ( f a (List.hd l)) (List.tl l) ;; > > > > j'ai compris l'utilité d'une telle declaration mais pas celle du > > < a > qui se trouve à la 3eme ligne. > > Quelqu'un pourrait t'il m'éclairer sur la troisieme ligne? > > si l = [1; 2; 3; 4; 5; 6; 7; 8; 9] > > alors exemple_1 f a l va calculer > > (f (f (f (f ... (f (f a 9) 8) ...4) 3) 2) 1) mais qu'est ce que je raconte ? ce que ça calcule c'est (f (f (f (f ... (f (f a 1) 2) ...6) 7) 8) 9) en effet exemple_1 f a [1; 2; 3; 4; 5; 6; 7; 8; 9] = exemple_1 f (f a 1) [2; 3; 4; 5; 6; 7; 8; 9] = exemple_1 f (f (f a 1) 2) [ 3; 4; 5; 6; 7; 8; 9] = .... -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr