ClojureDocs

导航

命名空间

tree-seq

clojure.core

1.0 版起提供 (源代码)
  • (tree-seq 分支?子代根)
Returns a lazy sequence of the nodes in a tree, via a depth-first walk.
 branch? must be a fn of one arg that returns true if passed a node
 that can have children (but may not).  children must be a fn of one
 arg that returns a sequence of the children. Will only be called on
 nodes for which branch? returns true. Root is the root node of the
tree.