anchor.diff:  				F(F, mnesia:select(offer, MatchSpec,
   						?CHUNKSIZE, read), Acc);
   			(_F, '$end_of_table', Acc) ->
  -				lists:flatten(lists:reverse(Acc));
  +				{ok, lists:flatten(lists:reverse(Acc))};
   			(_F, {error, Reason}, _Acc) ->
   				{error, Reason};
   			(F,{Offer, Cont}, Acc) ->
   				F(F, mnesia:select(Cont), [Offer | Acc])
   	end,
  -	case mnesia:transaction(F, [F, start, []]) of
  -		{aborted, Reason} ->
  +	case mnesia:ets(F, [F, start, []]) of
  +		{error, Reason} ->
   			{error, Reason};
  -		{atomic, Result} ->
  +		{ok, Result} ->
   			Result
   	end.
   
  
positive.code: 	F = fun() ->
  		case mnesia:read(product, ProdRef) of
  			[#product{balance = []}] ->
  				[];
  			[#product{balance = BucketRefs}] ->
  				MatchHead = #bucket{id = '$1', _ = '_'},
  				MatchIds = [{'==', Id, '$1'} || Id <- BucketRefs],
  				MatchConditions = [list_to_tuple(['or' | MatchIds])],
  				mnesia:select(bucket, [{MatchHead, MatchConditions, ['$_']}]);
  			[] ->
  				throw(product_not_found)
  		end
  	end,
  	case mnesia:transaction(F) of
  		{atomic, Buckets} ->
  			Buckets;
  		{aborted, {throw, Reason}} ->
  			{error, Reason};
  		{aborted, Reason} ->
  			{error, Reason}
  	end.
  
  
negative.code: 				F(F, mnesia:select(client, MatchSpec,
  						?CHUNKSIZE, read), Acc);
  			(_F, '$end_of_table', Acc) ->
  				{ok, lists:flatten(lists:reverse(Acc))};
  			(_F, {error, Reason}, _Acc) ->
  				{error, Reason};
  			(F,{Clients, Cont}, Acc) ->
  				F(F, mnesia:select(Cont), [Clients | Acc])
  	end,
  	case mnesia:ets(F, [F, start, []]) of
  		{error, Reason} ->
  			{error, Reason};
  		{ok, Result} ->
  			Result
  	end.
  
  