diff --git a/src/hamt.erl b/src/hamt.erl index eaeb91e..93df5c0 100644 --- a/src/hamt.erl +++ b/src/hamt.erl @@ -319,6 +319,8 @@ map_1(F, {K, V, Smaller, Larger}) -> fold(Fun, {hamt, _, Node}, Acc) -> fold_1(Fun, Acc, Node). +fold_1(_F, Acc, nil) -> + Acc; fold_1(F, Acc, {snode, Key, Value}) -> F(Key, Value, Acc); fold_1(_F, Acc, {cnode, _, []}) ->