diff --git a/List-of-Macros.md b/List-of-Macros.md index 7fc010f..bbdbd1c 100644 --- a/List-of-Macros.md +++ b/List-of-Macros.md @@ -20,6 +20,7 @@ - [extend-protocolpath](#extend-protocolpath) - [path](#path) - [providepath](#providepath) + - [recursive-path](#recursive-path) - [Collector Macros](#collector-macros) - [defcollector](#defcollector) - [Navigator Macros](#navigator-macros) @@ -355,6 +356,18 @@ Any higher order navigators passed to `path` must include their arguments, even Defines the path that will be associated to the provided name. The name must have been previously declared using [declarepath](#declarepath). +## recursive-path + +`(recursive-path params self-sym path)` + +Assists in making recursive paths, both parameterized and unparameterized. Example: + +```clojure +=> (let [tree-walker (recursive-path [] p (if-path vector? [ALL p] STAY))] + (select tree-walker [1 [2 [3 4] 5] [[6]]])) +[1 2 3 4 5 6] +``` + # Collector Macros ## defcollector @@ -423,4 +436,4 @@ See also [nav](#nav) `(nav params transform-impl select-impl)` -Returns an "anonymous navigator." See [defnav](#defnav). \ No newline at end of file +Returns an "anonymous navigator." See [defnav](#defnav).