add examples
This commit is contained in:
parent
c2f669db71
commit
e92fd674b1
1 changed files with 14 additions and 0 deletions
14
README.md
14
README.md
|
|
@ -146,6 +146,20 @@ user> (setval [:a ALL nil?] NONE {:a [1 2 nil 3 nil]})
|
|||
{:a [1 2 3]}
|
||||
```
|
||||
|
||||
Remove key/value pair from nested map:
|
||||
|
||||
```clojure
|
||||
user> (setval [:a :b :c] NONE {:a {:b {:c 1}}})
|
||||
{:a {:b {}}}
|
||||
```
|
||||
|
||||
Remove key/value pair from nested map, removing maps that become empty along the way:
|
||||
|
||||
```clojure
|
||||
user> (setval [:a (compact :b :c)] NONE {:a {:b {:c 1}}})
|
||||
{}
|
||||
```
|
||||
|
||||
Increment all the odd numbers between indices 1 (inclusive) and 4 (exclusive):
|
||||
|
||||
```clojure
|
||||
|
|
|
|||
Loading…
Reference in a new issue