clojure.zip/next

functionsince v0.0-927 clojure.zip/nextEdit
(next loc)

Source docstring:
Moves to the next loc in the hierarchy, depth-first. When reaching
the end, returns a distinguished loc detectable via end?. If already
at the end, stays there.
Source code @ clojurescript:src/main/cljs/clojure/zip.cljs
(defn next
  [loc]
    (if (= :end (loc 1))
      loc
      (or 
       (and (branch? loc) (down loc))
       (right loc)
       (loop [p loc]
         (if (up p)
           (or (right (up p)) (recur (up p)))
           [(node p) :end])))))