Ring: swap operation order in Ring.Maketable.add

This commit is contained in:
Pietro 2018-03-13 15:36:16 +01:00 committed by Grégoire Henry
parent 511b47148c
commit 3683e948c1

View File

@ -111,10 +111,10 @@ module MakeTable (V: Hashtbl.HashedType) = struct
table = Table.create size }
let add {contents = t } v =
Table.add t.table v ();
Option.iter
(Ring.add_and_return_erased t.ring v)
~f:(Table.remove t.table)
~f:(Table.remove t.table);
Table.add t.table v ()
let mem {contents = t} v = Table.mem t.table v