anchor.diff:      "}"
       >>.
   
  +count_by_owner_map_func() ->
  +    <<
  +    "function(doc) {"
  +    "  emit(doc.owner, 1);"
  +    "}"
  +    >>.
  +
  +count_public_map_func() ->
  +    <<
  +    "function(doc) {"
  +    "  if (doc.public) {"
  +    "    emit(null, 1);"
  +    "  }"
  +    "}"
  +    >>.
  +
   count_public_by_owner_map_func() ->
       <<
       "function(doc) {"
  
positive.code:             {<<"list_by_owner">>, [
                  {<<"map">>, list_by_owner_map_func()}
              ]},
              {<<"count_by_owner">>, [
                  {<<"map">>, count_by_owner_map_func()},
                  {<<"reduce">>, <<"_count">>}
              ]},
              {<<"list_public">>, [
                  {<<"map">>, list_public_map_func()}
              ]},
              {<<"count_public">>, [
                  {<<"map">>, count_public_map_func()},
                  {<<"reduce">>, <<"_count">>}
              ]},
              {<<"list_public_by_owner">>, [
                  {<<"map">>, list_public_by_owner_map_func()}
              ]},
              {<<"count_public_by_owner">>, [
                  {<<"map">>, count_public_by_owner_map_func()},
  
negative.code:     "}"
      >>.
  
  list_public_by_owner_map_func() ->
      <<
      "function(doc) {"
  