commonSubtree<T> static method
The lowest node in the tree that encompasses all nodes.
Implementation
static State<T> commonSubtree<T>(Iterable<State<T>> nodes) => (nodes
.map((s) => {s, ...s.ancestors()})
.reduce((a, b) => a.intersection(b))
.reduce((a, b) => a.order > b.order ? a : b));