10 Module tree
| (require rdf/core/tree) | package: rdf-core | 
The following diagram demonstrates the structure of a graph tree, rather than representing the graph as a simple set of statements it turns the graph into a map of maps indexed initially by subject, then by predicate, and finally objects are collected into a set per statement-predicate path.
| ┌─root─┐ ┌─limb─┐ ┌branch┐ ┌──────────twigs────────────┐ | 
| ┌──────┐ | 
| ┌──▶│ sub1 ─▶ ┌──────┐ | 
| │ └──────┘ ┌──▶│ prd1 ─▶ | 
| │ │ └──────┘ ┌────────────────────────── | 
| ┌──────┐ │ ┌──────┐ │ ┌──────┐ │┌──────┐┌──────┐┌──────┐ | 
| │ tree ───┼──▶│ sub2 ──┼──▶│ prd2 ─────▶││ obj1 ││ obj1 ││ obj1 │┈┈ | 
| └──────┘ │ └──────┘ │ └──────┘ │└──────┘└──────┘└──────┘ | 
| │ │ ┌──────┐ └────────────────────────── | 
| │ ┌──────┐ └──▶│ sub3 ─▶ | 
| └──▶│ sub3 ─▶ └──────┘ | 
| └──────┘ | 
Tree Module Overview
value
graph-tree-twigs/c : contract?
value
graph-tree-branch/c : contract?
value
graph-tree/c : contract?
procedure
graph : graph? 
procedure
statements : statement-set? 
procedure
(tree->statements tree) → statement-set?
tree : graph-tree/c