anchor.diff:  -spec get_bucket(set(), non_neg_integer()) -> term().
   get_bucket(T, Slot) -> get_bucket_s(T#set.segs, Slot).
   
  -%% on_bucket(Fun, Hashdb, Slot) -> {NewHashDb,Result}.
  -%%  Apply Fun to the bucket in Slot and replace the returned bucket.
  --spec on_bucket(fun((_) -> {[_], 0 | 1}), set(E), non_neg_integer()) ->
  -	  {set(E), 0 | 1}.
  -on_bucket(F, T, Slot) ->
  -    SegI = ((Slot-1) div ?seg_size) + 1,
  -    BktI = ((Slot-1) rem ?seg_size) + 1,
  -    Segs = T#set.segs,
  -    Seg = element(SegI, Segs),
  -    B0 = element(BktI, Seg),
  -    {B1, Res} = F(B0),				%Op on the bucket.
  -    {T#set{segs = setelement(SegI, Segs, setelement(BktI, Seg, B1))},Res}.
  -
   %% fold_set(Fun, Acc, Dictionary) -> Dictionary.
   %% filter_set(Fun, Dictionary) -> Dictionary.
   
  
positive.code:     Seg = setelement(BktI, element(SegI, Segs), Bkt),
      setelement(SegI, Segs, Seg).
  
  -spec maybe_expand(set(E), 0 | 1) -> set(E).
  maybe_expand(T0, Ic) when T0#set.size + Ic > T0#set.exp_size ->
      T = maybe_expand_segs(T0),			%Do we need more segments.
      N = T#set.n + 1,				%Next slot to expand into
      Segs0 = T#set.segs,
  
negative.code:       Set2 :: set(Element).
  add_element(E, S0) ->
      Slot = get_slot(S0, E),
      Bkt = get_bucket(S0, Slot),
      case lists:member(E, Bkt) of
          true ->
              S0;
          false ->
              S1 = update_bucket(S0, Slot, [E | Bkt]),
              maybe_expand(S1)
      end.
  
  %% del_element(Element, Set) -> Set.
  %%  Return Set but with Element removed.
  