let fold_keys t ~init ~f =
    Doubly_linked.fold t.queue ~init ~f:(fun ac kv ->
      (f ac ~key:kv.key ~data:kv.value))