From 6a07fa3e9da610d69b37bb290d4fd60c5cc25a18 Mon Sep 17 00:00:00 2001 From: Christopher O'Donnell Date: Sun, 12 Jun 2016 12:30:44 -0400 Subject: [PATCH 1/4] Updated List of Navigators (markdown) --- List-of-Navigators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/List-of-Navigators.md b/List-of-Navigators.md index 49b76ca..11a978e 100644 --- a/List-of-Navigators.md +++ b/List-of-Navigators.md @@ -3,7 +3,7 @@ **Note:** Many of the descriptions and a couple of the examples are lightly edited from those found on the [Codox documentation](http://nathanmarz.github.io/specter/com.rpl.specter.html). [ALL](#ALL) [ATOM](#ATOM) [BEGINNING](#BEGINNING) [END](#END) [FIRST](#FIRST) [LAST](#LAST) -[MAP-VALS](#MAP-VALS) [NIL->LIST](#NIL->LIST) [NIL->SET](#NIL->SET) [NIL->VECTOR](#NIL->VECTOR) +[MAP-VALS](#MAP-VALS) [NIL->LIST](#NIL-\>LIST) [NIL->SET](#NIL->SET) [NIL->VECTOR](#NIL->VECTOR) [STAY](#STAY) [STOP](#STOP) [VAL](#VAL) [codewalker](#codewalker) [collect](#collect) [collect-one](collect-one) [comp-paths](#comp-paths) From 1ea6f9f468fb494398a38d23eec33db057a14b38 Mon Sep 17 00:00:00 2001 From: Christopher O'Donnell Date: Sun, 12 Jun 2016 12:32:49 -0400 Subject: [PATCH 2/4] Fix links with > in them. --- List-of-Navigators.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/List-of-Navigators.md b/List-of-Navigators.md index 11a978e..063c9e3 100644 --- a/List-of-Navigators.md +++ b/List-of-Navigators.md @@ -3,7 +3,7 @@ **Note:** Many of the descriptions and a couple of the examples are lightly edited from those found on the [Codox documentation](http://nathanmarz.github.io/specter/com.rpl.specter.html). [ALL](#ALL) [ATOM](#ATOM) [BEGINNING](#BEGINNING) [END](#END) [FIRST](#FIRST) [LAST](#LAST) -[MAP-VALS](#MAP-VALS) [NIL->LIST](#NIL-\>LIST) [NIL->SET](#NIL->SET) [NIL->VECTOR](#NIL->VECTOR) +[MAP-VALS](#MAP-VALS) [NIL->LIST](#NIL-LIST) [NIL->SET](#NIL-SET) [NIL->VECTOR](#NIL-VECTOR) [STAY](#STAY) [STOP](#STOP) [VAL](#VAL) [codewalker](#codewalker) [collect](#collect) [collect-one](collect-one) [comp-paths](#comp-paths) @@ -11,7 +11,7 @@ [compiled-select-one](#compiled-*) [compiled-select-one!](#compiled-*) [compiled-setval](#compiled-*) [compiled-transform](#compiled-*) [cond-path](#cond-path) [continue-then-stay](#continue-then-stay) [continuous-subseqs](#continuous-subseqs) [filterer](#filterer) [if-path](#if-path) -[keypath](#keypath) [multi-path](#multi-path) [must](#must) [nil->val](#nil->val) [params-reset](#params-reset) +[keypath](#keypath) [multi-path](#multi-path) [must](#must) [nil->val](#nil-val) [params-reset](#params-reset) [parser](#parser) [pred](#pred) [putval](#putval) [not-selected?](#not-selected?) [selected?](#selected?) [srange](#srange) [srange-dynamic](#srange-dynamic) [stay-then-continue](#stay-then-continue) [submap](#submap) [subselect](#subselect) [subset](#subset) From a02931d16b364d2bbc6dc8363c0d7500f61652e2 Mon Sep 17 00:00:00 2001 From: Christopher O'Donnell Date: Sun, 12 Jun 2016 12:35:58 -0400 Subject: [PATCH 3/4] Fix capitalized links. --- List-of-Navigators.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/List-of-Navigators.md b/List-of-Navigators.md index 063c9e3..28aeb1e 100644 --- a/List-of-Navigators.md +++ b/List-of-Navigators.md @@ -2,9 +2,9 @@ **Note:** Many of the descriptions and a couple of the examples are lightly edited from those found on the [Codox documentation](http://nathanmarz.github.io/specter/com.rpl.specter.html). -[ALL](#ALL) [ATOM](#ATOM) [BEGINNING](#BEGINNING) [END](#END) [FIRST](#FIRST) [LAST](#LAST) -[MAP-VALS](#MAP-VALS) [NIL->LIST](#NIL-LIST) [NIL->SET](#NIL-SET) [NIL->VECTOR](#NIL-VECTOR) -[STAY](#STAY) [STOP](#STOP) [VAL](#VAL) +[ALL](#all) [ATOM](#atom) [BEGINNING](#beginning) [END](#end) [FIRST](#first) [LAST](#last) +[MAP-VALS](#map-vals) [NIL->LIST](#nil-list) [NIL->SET](#nil-set) [NIL->VECTOR](#nil-vector) +[STAY](#stay) [STOP](#stop) [VAL](#val) [codewalker](#codewalker) [collect](#collect) [collect-one](collect-one) [comp-paths](#comp-paths) [compiled-replace-in](#compiled-*) [compiled-select](#compiled-*) [compiled-select-first](#compiled-*) From 0ad54cf8f9df7613178b575ba1d7473bf8787b82 Mon Sep 17 00:00:00 2001 From: Christopher O'Donnell Date: Sun, 12 Jun 2016 12:38:10 -0400 Subject: [PATCH 4/4] Merge changes. --- List-of-Navigators.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/List-of-Navigators.md b/List-of-Navigators.md index 28aeb1e..0d14a6e 100644 --- a/List-of-Navigators.md +++ b/List-of-Navigators.md @@ -16,12 +16,11 @@ [selected?](#selected?) [srange](#srange) [srange-dynamic](#srange-dynamic) [stay-then-continue](#stay-then-continue) [submap](#submap) [subselect](#subselect) [subset](#subset) [transformed](#transformed) [view](#view) [walker](#walker) - ## Unparameterized Navigators ### ALL -`ALL` navigates to every element in a collection. If the collection is a map, it will navigate to each key-value pair `[key value]`. Reconstructs collection items as a vector when used in a select. +`ALL` navigates to every element in a collection. If the collection is a map, it will navigate to each key-value pair `[key value]`. ```clojure => (select ALL [0 1 2 3]) @@ -61,6 +60,8 @@ (0 1 2 3 4 5 6) => (setval BEGINNING {0 1} (range 2 7)) ([0 1] 2 3 4 5 6) +=> (setval BEGINNING '(0 1) [2 3 4]) +[0 1 2 3 4] => (setval BEGINNING {:foo :baz} {:foo :bar}) ([:foo :baz] [:foo :bar]) ``` @@ -76,6 +77,8 @@ (0 1 2 3 4 5 6) => (setval END {5 6} (range 5)) (0 1 2 3 4 [5 6]) +=> (setval END '(5 6) [1 2 3 4]) +[1 2 3 4 5 6] => (setval END {:foo :baz} {:foo :bar}) ([:foo :bar] [:foo :baz]) ``` @@ -458,7 +461,7 @@ navigated at the structure. `(params-reset params-path)` -Resets the index in the parameter list to 0. Useful for defining recursive navigators. +Instructs the provided navigator to backtrack in the params array by the number of parameters it requires before navigating. Useful for defining recursive navigators. ```clojure => (let [k-path (comp-paths must (params-reset must))]