Permalink
Browse files

Use list comprehension instead of lists:map

  • Loading branch information...
1 parent 491c704 commit 22f2ee88aa5dd570d87fddcbb3b7edcc41573765 @nifoc nifoc committed Apr 4, 2013
Showing with 1 addition and 5 deletions.
  1. +1 −5 src/db_adapters/boss_db_adapter_riak.erl
@@ -229,11 +229,7 @@ riak_search_encode_value(V) ->
V.
riak_search_decode_data(Data) ->
- lists:map(fun({K, V}) ->
- DecodedKey = riak_search_decode_key(K),
- DecodedValue = riak_search_decode_value(V),
- {DecodedKey, DecodedValue}
- end, Data).
+ [{riak_search_decode_key(K), riak_search_decode_value(V)} || {K, V} <- Data].
riak_search_decode_key(K) ->
list_to_atom(binary_to_list(K)).

0 comments on commit 22f2ee8

Please sign in to comment.