let copy t =
    {
      heap = Heap.copy t.heap;
      tbl = Table.copy t.tbl;
    }