Skip to content

Instantly share code, notes, and snippets.

@dabd
Created November 26, 2013 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabd/7662792 to your computer and use it in GitHub Desktop.
Save dabd/7662792 to your computer and use it in GitHub Desktop.
(loop [loc (z/vector-zip [1 [2 3]])]
(if (z/end? loc)
(z/root loc)
(recur
(z/next
(z/edit loc (fn [n & args] (if (and (number? n) (odd? n))
(* 2 n)
n)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment