add examples

This commit is contained in:
nathanmarz 2017-12-24 18:39:01 -05:00
parent c2f669db71
commit e92fd674b1

View file

@ -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