anchor.diff:      erlang:put("local_snap_number", 0),
       {0, false, []}.
   
  --spec new(non_neg_integer(), boolean(), list()) -> snapshot_state().
  +-spec new(non_neg_integer(), boolean(), [comm:mypid() | none]) -> snapshot_state().
   new(Number, InProgress, Leaders) ->
       erlang:put("local_snap_number", Number),
  -    {Number, InProgress, Leaders}.
  +    {Number, InProgress, [X || X <- Leaders, X =/= none]}.
   
   % getters
   
  
positive.code:     erlang:put("local_snap_number", NewVal),
      setelement(1, SnapInfo, NewVal).
  
  -spec add_leader(snapshot_state(), any()) -> snapshot_state().
  add_leader({Number, InProgress, Leaders}, NewLeader) ->
      case NewLeader of
          none ->
              {Number, InProgress, Leaders};
          _ ->
              {Number, InProgress, [NewLeader | Leaders]}
      end.
    
  -spec start_progress(snapshot_state()) -> snapshot_state().
  start_progress(SnapInfo) -> setelement(2, SnapInfo, true).
  
negative.code: -export_type([snapshot_state/0]).
  -endif.
  
  -type(snapshot_state() :: {SnapNo::non_neg_integer(), InProgress::boolean(), Leaders::[comm:mypid()]}).
  
  % constructors
  
  