uniqueID.ml
spotlib
1 2 3 4 5 6 7 8 9 type t = int ref let create () = ref 0 let get r = let v = !r in if v < 0 then failwith "UniqueID.get: overflow"; incr r; v
1 2 3 4 5 6 7 8 9
type t = int ref let create () = ref 0 let get r = let v = !r in if v < 0 then failwith "UniqueID.get: overflow"; incr r; v