Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] "toggle" for Pervasives?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris Hecker <checker@d...>
Subject: [Caml-list] "toggle" for Pervasives?

I'm sure putting more stuff in Pervasives is frowned upon, but
I find myself doing this all the time and it fits well with
incr and decr:

let toggle bool_ref = bool_ref := not !bool_ref

Chris


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr