Except of course zip-seq doesn't need the f, acc arguments. Sorry about
that.
On Monday, December 24, 2012 7:18:17 PM UTC-8, Alan Malloy wrote:
>
> Probably better to write it more generally, by creating a seq from a
> zipper and then just using the ordinary reduce function on that zip:
>
> (def
Probably better to write it more generally, by creating a seq from a zipper
and then just using the ordinary reduce function on that zip:
(defn zip-seq [f acc z]
(map node (tree-seq branch? children z)))
(reduce f acc (zip-seq some-zipper))
On Monday, December 24, 2012 6:27:00 PM UTC-8, JvJ w