Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Shallow copy of a record
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Kurt Welgehausen <kwel@k...>
Subject: Re: [Caml-list] Shallow copy of a record
It's not clear whether you require a general polymorphic
copy function or you just need to make a copy of a
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).

Best regards