Stumped with functional breadth-first tree traversal in Clojure?

前端 未结 4 1117
借酒劲吻你
借酒劲吻你 2021-02-02 12:24

Say I have a tree defined as per the recommendation in this post, although it\'s a vector in my case, which hopefully shouldn\'t matter (they\'re vectors in Programming Clojure

4条回答
  •  滥情空心
    2021-02-02 12:43

    many combinations of reduceand conj can be replaced with single into call in the case above with reduce you may need to pass an initial empty vector to reduce to get make conjunction happy.

提交回复
热议问题