anchor.diff:  to_list(#sorted{list = L}) ->
       L.
   
  +get_total(#sorted{total = Total}) ->
  +    Total.
  +
   insert(#sorted{n = N,
   	       dir = Dir,
   	       max = Max,
  -	       list = L}, E) ->
  +	       list = L,
  +	       total = Total} = S, E) ->
       L2 = insert1(N, Dir, L, E),
       L3 = if
   	     is_integer(Max) andalso length(L2) > Max ->
  
positive.code: 	     true ->
  		 L2
  	 end,
      #sorted{list = L3}.
  
  insert1(_, _, [], E) ->
      [E];
  
negative.code:     end.
  
  compare(N, Dir, A, B) ->
      A1 = element(N, A),
      B1 = element(N, B),
      case Dir of
  	desc -> A1 < B1;
  	asc -> A1 > B1
      end.
  
  	    
  