Document nthpath.
This commit is contained in:
parent
a9b0996e78
commit
632770f104
1 changed files with 16 additions and 0 deletions
|
|
@ -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)`
|
||||
|
|
|
|||
Loading…
Reference in a new issue