whole_func_string: function BinarySearchTreeIterator(tree, type) {
      type = type || 'v';
  
      if (type !== 'k' && type !== 'v' && type !== 'e') {
          throw new Error('Incorrect binary search tree iterator type "' + type + '"!');
      }
  
      this._type = type;
      this._tree = tree;
      this._last = null;
      this._done = false;
  }
func_code_string: function BinarySearchTreeIterator(tree, type) {
      type = type || 'v';
  
      if (type !== 'k' && type !== 'v' && type !== 'e') {
          throw new Error('Incorrect binary search tree iterator type "' + type + '"!');
      }
  
      this._type = type;
      this._tree = tree;
      this._last = null;
      this._done = false;
  }
func_documentation_string: Binary search tree iterator
  
  @param tree Binary Search tree
  @param type Type of iteration result
  @constructor