Created
November 26, 2013 17:49
-
-
Save dabd/7662792 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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