diff --git a/dev/containers/CCRef/index.html b/dev/containers/CCRef/index.html index 6efd7111..fa877a79 100644 --- a/dev/containers/CCRef/index.html +++ b/dev/containers/CCRef/index.html @@ -1,2 +1,2 @@ -
CCRefHelpers for references
val create : 'a -> 'a tAlias to ref.
val iter : ( 'a -> unit ) -> 'a t -> unitCall the function on the content of the reference.
val update : ( 'a -> 'a ) -> 'a t -> unitUpdate the reference's content with the given function.
val incr_then_get : int t -> intincr_then_get r increments r and returns its new value, think ++r.
val get_then_incr : int t -> intget_then_incr r increments r and returns its old value, think r++.
val to_list : 'a t -> 'a listCCRefHelpers for references
val create : 'a -> 'a tAlias to ref.
val iter : ( 'a -> unit ) -> 'a t -> unitCall the function on the content of the reference.
val update : ( 'a -> 'a ) -> 'a t -> unitUpdate the reference's content with the given function.
val incr_then_get : int t -> intincr_then_get r increments r and returns its new value, think ++r.
val get_then_incr : int t -> intget_then_incr r increments r and returns its old value, think r++.
val protect : 'a t -> 'a -> ( unit -> 'b ) -> 'bprotect r x f sets r := x; calls f(); restores r to its old value; and returns the result of f().
val to_list : 'a t -> 'a list