Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (12 sloc) 233 Bytes
(* New variable generator *)
module type GENSYM =
sig
val reset : unit -> unit
val next : string -> string
end ;;
module Gensym : GENSYM =
struct
let c = ref 0
let reset () = c:=0
let next s = incr c ; s ^ (string_of_int !c)
end;;