[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Erik de Castro Lopo <ocaml-erikd@m...> |
| Subject: | Syntax for partial copy of struct member |
Hi all,
There's something in Ocaml that allows me to have a struct
defined as:
type struct_t = { a : int ; b : int ; c : int }
and an instance of that say:
let x = { a = 1 ; b = 2 ; c = 3 }
and then have:
let y = { a = 2 ; (* b and c filled in from x *) }
but I can't for the life of me remember the syntax. Anyone care
to give me a gentle tap with the clue bat?
Thanks,
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
"Death is perhaps too easy" -- Iqbal Sacranie in 1989 about
Salman Rushdie, author of "The Satanic Verses". Sacranie
received a knighthood in 2005 as the face of 'moderate'
British Islam. He has never disowned his earlier statement.