From fe634baaddee22e7173cba236f26dce05096090b Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Mon, 18 Sep 2017 08:50:58 -0400 Subject: [PATCH] Document 'nthpath' multiple arguments. --- List-of-Navigators.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/List-of-Navigators.md b/List-of-Navigators.md index e09f4ed..ddddb62 100644 --- a/List-of-Navigators.md +++ b/List-of-Navigators.md @@ -778,6 +778,17 @@ Navigate to the specified indices (one after another). Transform to NONE to remo [1 2] ``` +`nthpath` can now take multiple arguments, for concisely specifying multiple steps. It navigates to each index, one after another. + +```clojure +=> (select [(nthpath 0)] [1 2 3]) +[1] +=> (select [(nthpath 0)] [[0 1 2] 2 3]) +[[0 1 2]] +=> (select [(nthpath 0 0)] [[0 1 2] 2 3]) +[0] +``` + ## parser `(parser parse-fn unparse-fn)`