fold_1 function was missing a clause for nil

This commit is contained in:
Gregory Burd 2013-02-26 18:41:35 -05:00
parent 27d892bfc8
commit 146bb62380

View file

@ -319,6 +319,8 @@ map_1(F, {K, V, Smaller, Larger}) ->
fold(Fun, {hamt, _, Node}, Acc) -> fold(Fun, {hamt, _, Node}, Acc) ->
fold_1(Fun, Acc, Node). fold_1(Fun, Acc, Node).
fold_1(_F, Acc, nil) ->
Acc;
fold_1(F, Acc, {snode, Key, Value}) -> fold_1(F, Acc, {snode, Key, Value}) ->
F(Key, Value, Acc); F(Key, Value, Acc);
fold_1(_F, Acc, {cnode, _, []}) -> fold_1(_F, Acc, {cnode, _, []}) ->