         return children.count == 0
     }
     
-    /// All leaves.
+    /// - returns: All leaves.
     var leaves: [Self] {
         
         func descendToGetLeaves(of node: Self, result: inout [Self]) {

    
    // MARK: - Instance Methods
    
    /**
     Append a child node.
     */
    func addChild(_ node: Self)
    
    /**
     Append an array of Child nodes.
     */
    func addChildren(_ nodes: [Self])
    
    /**
     Insert the given child node at the given `index`.
     
     - throws: `MutableTreeError.Error.insertionError` if the given `index` is out of bounds.
     */
    func insertChild(_ node: Self, at index: Int) throws
    
    /**
     Remove the given child node.
     
     - throws: `MutableTreeError.Error.removalError` if the given node is not contained herein.
     */
    func removeChild(_ node: Self) throws
    
    /**
     Remove the child node at the given `index`.
     
     - throws: `MutableTreeError.Error.removalError` if the given `index` is out of bounds.
     */
    func removeChild(at index: Int) throws
    
    /**
     - returns: Child node at the given `index`, if present. Otherwise, `nil`.
     */
    func child(at index: Int) -> Self?
    
    /**
     - returns: Returns the leaf node at the given `index`, if present. Otherwise, `nil`.
     */
    func leaf(at index: Int) -> Self?
    
    /**
     - returns: `true` if the given node is contained herein. Otherwise, `false`.
     */
    func hasChild(_ child: Self) -> Bool
    
    /**
     - returns: `true` if the given node is a leaf. Otherwise, `false`.
     */
    func hasLeaf(_ node: Self) -> Bool
    
    /**
     - returns: `true` if the given node is an ancestor. Otherwise, `false`.
     */
    func hasAncestor(_ node: Self) -> Bool
    
    /**
     - returns: Ancestor at the given distance, if present. Otherwise, `nil`.
     */
    func ancestor(at distance: Int) -> Self?
    
    /**
     - returns: `true` if the given node is a descendent. Otherwise, `false`.
     */
    func hasDescendent(_ node: Self) -> Bool
}

public extension MutableTreeProtocol {
    
    /**
     Add the given `node` to `children`.
     */
    func addChild(_ node: Self) {
        children.append(node)
        node.parent = self
    }
    
    /**
     Append the given `nodes` to `children`.
     */
    func addChildren(_ nodes: [Self]) {
        nodes.forEach(addChild)
    }
    
    /**
     Insert the given `node` at the given `index` of `children`.
     
     - throws: `MutableTreeError.insertionError` if `index` is out of bounds.
     */
    func insertChild(_ node: Self, at index: Int) throws {
        
        guard index <= children.endIndex else {

        try removeChild(at: index)
    }
    
    /// Remove the node at the given `index`.
    ///
    /// - throws: `MutableTreeError.removalError` if `index` is out of bounds.
    func removeChild(at index: Int) throws {
        
        guard children.indices.contains(index) else {
