1 2 3 4 5
structure GenSym = struct val counter : int ref = ref 0 fun new () : int = (counter := (!counter + 1) ; !counter) end