title: How to traverse a tree in Clojure while collecting the value from each node node?
body: <p>I want to create a function that collects the value from each node in a binary tree.  In the ClojureDocs, I found several functions for traversing a tree/graph, such as tree-seq, prewalk, and postwalk. </p>
  
  <p><a href="https://clojuredocs.org/clojure.core/tree-seq" rel="nofollow">https://clojuredocs.org/clojure.core/tree-seq</a></p>
  
  <p><a href="https://clojuredocs.org/clojure.walk/prewalk" rel="nofollow">https://clojuredocs.org/clojure.walk/prewalk</a></p>
  
  <p><a href="https://clojuredocs.org/clojure.walk/postwalk" rel="nofollow">https://clojuredocs.org/clojure.walk/postwalk</a></p>
  
  <p>Can any of these be used to accumulate the value of nodes traversed?  As a Clojure newby, I don't see how to do it.  If you know how (in Clojure or similar Lispy language), please show me.  Ideally, your answer will be understandable by a Clojure newby;-)</p>
  
  <p>My binary tree is represented with nodes like this: (value left-child right-child). For example:</p>
  
  <blockquote>
    <p>( 2 (7 nil nil) (88 (5 nil nil) nil) )</p>
  </blockquote>
  
  <p>From this example, I'd like the function to return (2 7 88 5).</p>
  
  <p>NOTE: The traversal method isn't important.  I just want to learn a technique for collecting node values. </p>