     ///
     /// - throws: `TreeError` if `self` is a `leaf`.
     public func replacingTree(at index: Int, with tree: Tree) throws -> Tree {
+        
         switch self {
         case .leaf:
             throw TreeError.branchOperationPerformedOnLeaf


/// - returns: `true` if two `Tree` values are equivalent. Otherwise, `false`.
public func == <T: Equatable> (lhs: Tree<T>, rhs: Tree<T>) -> Bool {
    switch (lhs, rhs) {
    case (.leaf(let a), .leaf(let b)):
        return a == b

    
    /// - returns: A new `Tree` with the given `value` as payload.
    public func updating(value: T) -> Tree {
        
        switch self {
        case .leaf:
            return .leaf(value)
