             return []
         }
 
-        var children = [Node]()
+        var branches = [Branch]()
 
         paragraph.enumerateAttributes(in: paragraph.rangeOfEntireString, options: []) { (attrs, range, _) in
 

            let leafNodes = createLeafNodes(from: substring)
            let styleNodes = createStyleNodes(from: attrs)

            let subtree = reduce(nodes: styleNodes, leaves: leafNodes)
            children.append(contentsOf: subtree)
        }

        let paragraphNodes = createParagraphNodes(from: paragraph)
        return reduce(nodes: paragraphNodes, leaves: children)
    }


    /// Sets Up a collection of Nodes and Leaves as a chain of Parent-Children, and returns the root node.and
    /// If the collection of nodes is empty, will return the leaves parameters 'as is'.
    ///
    private func reduce(nodes: [ElementNode], leaves: [Node]) -> [Node] {
        return nodes.reduce(leaves) { (result, node) in
            node.children = result
            return [node]

}


// MARK: - Merge: Styles
//
private extension NSAttributedStringToNodes {

    ///
    ///
    typealias Branch = (styles: [ElementNode], leaves: [Node])


    ///
    ///
    func merge(branches: [Branch]) -> [Node] {
        return branches.flatMap { branch in
            return self.reduce(nodes: branch.styles, leaves: branch.leaves)
        }
    }
}


// MARK: - Merge: Paragraphs
//
private extension NSAttributedStringToNodes {

