Walks this subtree in depth-first order.
Iterable<State<T>> get toIterable sync* { Iterable<State<T>> _toIterable(State<T> node) sync* { yield node; for (var child in node.substates) { yield* _toIterable(child); } } yield* _toIterable(this); }