let fresh_node_ref: unit -> node_ref = let next_value = ref 0 in fun () -> incr next_value; { node_ref_value = !next_value }