This file contains hidden or 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
| (ns cc.ziptrial | |
| (:use [clojure.zip :as zip] | |
| [clojure.test] | |
| )) | |
| (def v1 (zip/vector-zip [1 [2 3] [4 5]])) | |
| (defn leafnodes [loc] | |
| "returns all the leaf nodes in loc" | |
| (filter (complement zip/branch?) ;filter only non-branch nodes |
This file contains hidden or 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
| (ns cc.ziptrial | |
| (:use [clojure.zip :as zip] | |
| [clojure.test] | |
| )) | |
| (def v1 (zip/vector-zip [1 [2 3] [4 5]])) | |
| (defn leafnodes [loc] | |
| "returns all the leaf nodes in loc" | |
| (filter (complement zip/branch?) ;filter only non-branch nodes |
NewerOlder