Skip to content

Instantly share code, notes, and snippets.

@thecarlhall
Last active December 11, 2015 23:59
Show Gist options
  • Save thecarlhall/4680867 to your computer and use it in GitHub Desktop.
Save thecarlhall/4680867 to your computer and use it in GitHub Desktop.
% start with this
map_reindex({error,notfound}, _, _) ->
[];
map_reindex(RiakObject, _, _) ->
riak_search_kv_hook:precommit(RiakObject),
[].
% and convert to this
fun({error,notfound}, _, _) ->
[];
fun(RiakObject, _, _) ->
riak_search_kv_hook:precommit(RiakObject),
[]
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment