From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 5B540BB91 for ; Sat, 22 Jan 2005 17:45:21 +0100 (CET) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0MGjKPc031839 for ; Sat, 22 Jan 2005 17:45:21 +0100 Received: by wproxy.gmail.com with SMTP id 68so311963wri for ; Sat, 22 Jan 2005 08:45:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=mwLSDOll4DkHzGzHIxHzpcggt+8PZ3gk/f8I+ezJMK/CEtv+mYdXUqADVTyz2rMqb655K5/+3bqV9+0Exq7QTTCtpqZy7W2lD4znPfUA9f9ag22tu79waoNmbsmUJlGamKOBbDsFdG3LrwAq1FQWF8YyHOyOKX3gHO+Ja3NzENs= Received: by 10.54.41.71 with SMTP id o71mr109750wro; Sat, 22 Jan 2005 08:45:20 -0800 (PST) Received: by 10.54.5.8 with HTTP; Sat, 22 Jan 2005 08:45:20 -0800 (PST) Message-ID: <875c7e070501220845442bf88c@mail.gmail.com> Date: Sat, 22 Jan 2005 11:45:20 -0500 From: Chris King Reply-To: Chris King To: Kurt Welgehausen Subject: Re: [Caml-list] Shallow copy of a record Cc: caml-list@yquem.inria.fr In-Reply-To: <41F2606F.mail1PL1TYIX5@kwel.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <875c7e0705012120277c090ec8@mail.gmail.com> <41F2606F.mail1PL1TYIX5@kwel.net> X-Miltered: at nez-perce with ID 41F28320.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 polymorphic:01 latter:03 let:03 chris:05 redundant:05 assign:05 function:08 kurt:10 though:11 something:12 something:12 case:13 particular:13 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: On Sat, 22 Jan 2005 08:17:19 -0600, Kurt Welgehausen wrote: > It's not clear whether you require a general polymorphic > copy function or you just need to make a copy of a > particular record. Just the particular record. > In the latter case, something like > > let y = {x with a = x.a} > > will do what you want (even though it's not very pretty). Yeah, that's what I thought of first; I was just hoping there was a way to do it without the redundant assign (like {x} or something).