So the main algorithm uses iterator protocol, but you can also use the Strategy interface which behaves just like an ioc callback
— `var alg = new Strategy(onFirst, onAll); var result = alg.run(object);
— How many of you use vim?
— So depth-first is faster, since IDDFS will potentially visit the same nodes multiple times?
— Sometimes, not as main editor
— Do you use vim
— That shunts the iterator protocol into a callback interface. Otherwise you can talk to the traversal algorithm directly via: var traversal = iddfs(object); var iteration = traversal.next(); var flyweight = iteration.value;