Iterable<Path> ancestors() sync* { yield this; Path? current = parent().v; while (current != null) { yield current; current = current.parent().v; } }