akhudek / fast-zip

fast-zip
85 stars 16 forks source link

'leftmost' seems to be broken #9

Closed xsc closed 9 years ago

xsc commented 9 years ago

See xsc/rewrite-clj#15. Using version 0.5.1:

(require '[fast-zip.core :as z])
(let [loc (z/seq-zip '(a b c d e f))]
  (->> (z/down loc)
       (iterate z/right)
       (take-while identity)
       (map (comp z/node z/leftmost))))
;; => (a a b c d e)

Or more isolated:

(-> (z/seq-zip '(a b c d)) z/down z/right z/right z/leftmost z/node)
;; => b
akhudek commented 9 years ago

Fixed in 0.5.2. Thanks for the report.