summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobert Dionne <bob@cloudant.com>2011-05-19 12:10:59 -0400
committerRobert Dionne <bob@cloudant.com>2011-05-19 12:10:59 -0400
commit266ba88ac6ded40087e0211ad9e75e4ce64e66cb (patch)
tree12d2e3c5f6acba0d23ca383c1915751da4cee680 /apps
parent5e7ad32e1b1dee38aa37d7831b30ee8e54009016 (diff)
Removed duplicate code, thanks davisp.
Diffstat (limited to 'apps')
-rw-r--r--apps/couch/src/couch_key_tree.erl27
1 files changed, 0 insertions, 27 deletions
diff --git a/apps/couch/src/couch_key_tree.erl b/apps/couch/src/couch_key_tree.erl
index 2233f3a9..8b574309 100644
--- a/apps/couch/src/couch_key_tree.erl
+++ b/apps/couch/src/couch_key_tree.erl
@@ -328,33 +328,6 @@ tree_fold_simple(Fun, Pos, [{Key, Value, SubTree} | RestTree], Acc) ->
Acc2
end.
-foldl(_Fun, Acc, []) ->
- Acc;
-
-foldl(Fun, Acc, [{Pos, Branch} | Rest]) ->
- Acc1 = foldl_simple(Fun, Pos, [Branch], Acc),
- foldl(Fun, Acc1, Rest).
-
-foldl_simple(_Fun, _Pos, [], Acc) ->
- Acc;
-
-foldl_simple(Fun, Pos, [{Key, Value, []} | RestTree], Acc) ->
- case Fun({Pos, Key, Value}, leaf, Acc) of
- {ok, Acc1} ->
- foldl_simple(Fun, Pos, RestTree, Acc1);
- {stop, Acc1} ->
- Acc1
- end;
-
-foldl_simple(Fun, Pos, [{Key, Value, SubTree} | RestTree], Acc) ->
- Acc1 = foldl_simple(Fun, Pos + 1, SubTree, Acc),
- case Fun({Pos, Key, Value}, branch, Acc1) of
- {ok, Acc2} ->
- foldl_simple(Fun, Pos, RestTree, Acc2);
- {stop, Acc2} ->
- Acc2
- end.
-
map(_Fun, []) ->
[];
map(Fun, [{Pos, Tree}|Rest]) ->