diff --git a/List-of-Navigators.md b/List-of-Navigators.md index 5471812..147e866 100644 --- a/List-of-Navigators.md +++ b/List-of-Navigators.md @@ -37,6 +37,7 @@ - [multi-path](#multi-path) - [must](#must) - [nil->val](#nil-val) + - [nthpath](#nthpath) - [parser](#parser) - [pred](#pred) - [putval](#putval) @@ -555,6 +556,21 @@ navigated at the structure. :b ``` +## nthpath + +`(nthpath index)` + +Navigate to the specified indices (one after another). Transform to NONE to remove the element from the sequence. + +```clojure +=> (select [(nthpath 0)] [1 2 3]) +[1] +=> (select [(nthpath 2)] [1 2 3]) +[3] +=> (setval [(nthpath 2)] NONE [1 2 3]) +[1 2] +``` + ## parser `(parser parse-fn unparse-fn)`