It's one variety of depth-first. Pre-order, post-order, and in-order are all viable ways of doing depth-first searches (though in-order makes less sense for non-binary trees). Assume for the rest of this post the following tree:
1 --2 --3 ----4 ------5 ----6 --7 - Breadth-first traversal: 1237465 - Depth-first, preorder traversal: 1234567 - Depth-first, postorder traversal: 2546371 I think it's possible to split breadth-first into pre- and post-order as well, but it's been a long time since I took that class and trying to do it is making my head hurt. I think the important point is that there's more than one way to do depth-first traversal, and preorder looks like what Stuart is talking about. On Mar 16, 2:50 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote: > 2011/3/16 Stuart Sierra <the.stuart.sie...@gmail.com> > > > I think xml-seq is returning a sequence representing a depth-first > > traversal of the XML document. So the first item in the sequence is the > > entire document, followed by the first element under the root, and so on. > > That's not the definition of depth-first, is it ? > > > > > > > > > > > -Stuart Sierra > > clojure.com > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clojure@googlegroups.com > > Note that posts from new members are moderated - please be patient with > > your first post. > > To unsubscribe from this group, send email to > > clojure+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en