anchor.diff:  list([],Acc) -> Acc;
   list([[K]|Rest],Acc) -> list(Rest,[K|Acc]).
   
  -
  +list_bucket(#state{table=T}, Bucket) ->
  +    MList = dets:match(T,{'_',{Bucket,'$1','_'}}),
  +    list(MList,[]).
  
positive.code: get(#state{table=T}, Key) ->
      case dets:lookup(T, Key) of
          [] -> {error, notfound};
          [{Key,Val}] -> {ok, Val};
          {error, Err} -> {error, Err}
      end.
  
  % put(state(), Key :: binary(), Val :: binary()) ->
  %   ok | {error, Reason :: term()}
  % key must be 160b
  put(#state{table=T},Key,Val) -> dets:insert(T, {Key,Val}).
  
  % delete(state(), Key :: binary()) ->
  %   ok | {error, Reason :: term()}
  
negative.code: -module(riak_dets_backend).
  
  -include_lib("eunit/include/eunit.hrl").
  -export([start/1,stop/1,get/2,put/4,list/1,list_bucket/2,delete/2]).
  
  % @type state() = term().
  -record(state, {table}).
  