anchor.diff:      ns_bucket:set_map(Bucket, Map1).
   
   
  +%% for each replication turn in Map returns list of pairs {node(),
  +%% integer()} representing histogram of occurences of nodes in this
  +%% replication turn. Missing Servers are represented with counts of 0.
  +%% Nodes that are not present in Servers are ignored.
   histograms(Map, Servers) ->
       Histograms = [lists:keydelete(
                       undefined, 1,
  
positive.code:                  V + 1, [[Master|lists:reverse(Replicas1)]|NewMapReversed]).
  
  
  -spec perform_moves(string(), map(), moves(), fun((dict()) -> any())) ->
                             map() | no_return().
  perform_moves(Bucket, Map, Moves, ProgressFun) ->
  
negative.code:     end.
  
  
  %% removes RemapNodes from head of vbucket map Map. Returns new map
  promote_replicas(Bucket, Map, RemapNodes) ->
      [promote_replica(Bucket, Chain, RemapNodes, V) ||
          {V, Chain} <- misc:enumerate(Map, 0)].
  
  %% removes RemapNodes from head of vbucket map Chain for vbucket
  %% V. Actually switches master if head of Chain is in
  %% RemapNodes. Returns new chain.
  promote_replica(Bucket, Chain, RemapNodes, V) ->
      [OldMaster|_] = Chain,
      Bad = fun (Node) -> lists:member(Node, RemapNodes) end,
  