Version française
Home     About     Download     Resources     Contact us    
Browse thread
Newbie list question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Li <jli@c...>
Subject: Re: [Caml-list] Newbie list question
On Wed, May 13, 2009 at 08:06:34PM +0200, Cedric Auger wrote:
> Joel Christner a écrit :
>>
>> Then throughout the course of program operation, I will be adding data
>> into this list, i.e.:
>> # varlist.contents <- a::varlist.contents;;
>> # varlist.contents <- b::varlist.contents;;
>> # varlist.contents <- c::varlist.contents;;
> I don't know if you know it, but there exist a notation: "!varlist" as  
> syntactic sugar for "varlist.contents"

Yes, but of course.

# !varlist <- a :: !varlist

won't work. There's more sugar for that:

# varlist := a :: !varlist

is equivalent to the 3 lines you originally had.


-John