Permalink
Browse files

added some comments on the suggested new functions

  • Loading branch information...
1 parent 5241cdb commit ed90a0a214fa106d5dfe6076d079342800f8e79b Richard Carlsson committed Aug 8, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/stdlib/src/gb_trees.erl
@@ -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, []).
@@ -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.

0 comments on commit ed90a0a

Please sign in to comment.