Skip to content

Commit

Permalink
added some comments on the suggested new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Carlsson committed Aug 8, 2012
1 parent 5241cdb commit ed90a0a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/stdlib/src/gb_trees.erl
Expand Up @@ -511,7 +511,10 @@ to_list(nil, L) -> L.
Tree :: gb_tree(),
Key :: term(),
Val :: term().


%% TODO: is this the correct interface? closed/open?, all higher/lower?
%% TODO: documentation

range({From, To}=R, {_, T}) when From =< To ->
range(R, T, []).

Expand Down Expand Up @@ -567,7 +570,8 @@ iterator({_, T}) ->

iterator(Key, {_, T}) ->
iterator1(T, {Key, []}).


%% TODO: better implementation of iterator/2; no need to keep Key in structure

%% The iterator structure is really just a list corresponding to
%% the call stack of an in-order traversal. This is quite fast.
Expand Down

0 comments on commit ed90a0a

Please sign in to comment.