let get v = match List.find !nodes ~f:(fun (ee, _) -> ee = E v) with | Some (_, i) -> i | None -> incr count; nodes := (E v, !count) :: !nodes; !count