RE: OCaml question

From: Rui Shi (shearer@cs.bu.edu)
Date: Tue Nov 28 2006 - 18:54:53 EST


Return-Path: <shearer@cs.bu.edu>
X-Spam-HitLevel: 
X-Spam-DCC: : cs3.bu.edu 1113; Body=1 Fuz1=1 Fuz2=1
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cs3.bu.edu
X-Spam-Level: 
X-Spam-Status: No, score=-4.4 required=10.0 tests=ALL_TRUSTED,AWL,BAYES_00  autolearn=ham version=3.1.7
X-Spam-Pyzor: 
Received: from SHEARERSHOT (cs-b-tpe4 [128.197.10.98]) (authenticated bits=0) by cs3.bu.edu (8.13.6/8.13.6) with ESMTP id kASNspd5024327; Tue, 28 Nov 2006 18:54:56 -0500
Message-Id: <200611282354.kASNspd5024327@cs3.bu.edu>
From: "Rui Shi" <shearer@cs.bu.edu>
To: "'Michel Machado'" <michel@digirati.com.br>
Cc: <cs520@cs.bu.edu>
Subject: RE: OCaml question
Date: Tue, 28 Nov 2006 18:54:53 -0500
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
Thread-Index: AccTRuEvKtdlwWOLShiLNCHqQhM5FAAAYb/Q
In-Reply-To: <006c01c71346$d0998930$2ab6a8c0@dark>
X-Clamav-Status: No
Status: RO
Content-Length: 533
X-UID: 68
X-Keywords:                                                                                                    


 
In Ocaml, use "fst" and "snd" to get the first or second component of a
pair.

Rui

-----Original Message-----
From: Michel Machado [mailto:michel@digirati.com.br]
Sent: Tuesday, November 28, 2006 6:42 PM
To: Rui Shi
Subject: OCaml question

Hi Rui,

    Do you how to translate the following term to OCaml?

let f = lam x => lam y => (x y).2
in f (lam z=> (z,z)) 5

    This is the term that Sam posted on the mailing list. I don't know how
to write the projection ".2" in OCaml.

    Thanks in advance,

[ ]'s
Michel Machado



This archive was generated by hypermail 2b29 : Thu Dec 14 2006 - 16:31:59 EST