static public List <Link> ToList(Link link) { List <Link> list = new List <Link>(); SequenceWalker walker = new SequenceWalker(link, list.Add); walker.WalkFromLeftToRight(); return(list); }
static public void WalkThroughSequence(this Link link, Action <Link> action) { var walker = new SequenceWalker(link, action); walker.WalkFromLeftToRight(); }