   public func reverse() -> ReverseTreeGenerator<Element> {
     return ReverseTreeGenerator(stack: [], curr: self)
   }
-  
-  /// Remove the member if it was present, insert it if it was not.
-  
-  public mutating func XOR(x: Element) {
-    if case nil = remove(x) { insert(x) }
-  }
-
-  /// :nodoc:
-  
-  public func reduce<T>(initial: T, @noescape combine: (T, Element) -> T) -> T {
-    guard case let .Node(_, l, x, r) = self else { return initial }
-    let lx = l.reduce(initial, combine: combine)
-    let xx = combine(lx, x)
-    let rx = r.reduce(xx, combine: combine)
-    return rx
-  }
-  
-  /// :nodoc:
-  
-  public func forEach(@noescape body: Element -> ()) {
-    guard case let .Node(_, l, x, r) = self else { return }
-    l.forEach(body)
-    body(x)
-    r.forEach(body)
-  }
-}
-
-/**
-A `Generator` for a Tree
-*/
-
-public struct TreeGenerator<Element : Comparable> : GeneratorType {
-  private var (stack, curr): ([Tree<Element>], Tree<Element>)
-  /**
-  Advance to the next element and return it, or return `nil` if no next element exists.
-  */
-  public mutating func next() -> Element? {
-    while case let .Node(_, l, x, r) = curr {
-      if case .Empty = l {
-        curr = r
-        return x
-      } else {
-        stack.append(curr)
-        curr = l
-      }
-    }
-    guard case let .Node(_, _, x, r)? = stack.popLast()
-      else { return nil }
-    curr = r
-    return x
-  }
-}
-
-/// :nodoc:
-
-internal enum TreeBalance {
-  case Balanced(blackHeight: Int)
-  case UnBalanced
 }
 
 /**

      return (
        Tree.Node(.B, ll, lx, Tree.Node(.B, .Node(.R, lrl, lrx, lrr), x, r).balL()), false
      )
    }
  }
  

    }
    return x
  }
}

// MARK: Reverse

extension Tree {
  /**
  Returns a sequence of the elements of `self` from largest to smallest
  */
