Document set-elem.

This commit is contained in:
Michael Fogleman 2017-09-11 10:19:02 -04:00
parent 12472fa599
commit a9b0996e78

View file

@ -42,6 +42,7 @@
- [putval](#putval)
- [not-selected?](#not-selected)
- [selected?](#selected)
- [set-elem](#set-elem)
- [srange](#srange)
- [srange-dynamic](#srange-dynamic)
- [stay-then-continue](#stay-then-continue)
@ -649,6 +650,22 @@ See also [not-selected?](#not-selected?).
nil
```
## set-elem
`(set-elem element)`
Navigates to the given element in the set only if it exists in the set.
Can transform to NONE to remove the element from the set.
```clojure
=> (select [(set-elem 3)] #{3 4 5})
[3]
=> (select [(set-elem 3)] #{4 5})
[]
=> (setval [(set-elem 3)] NONE #{3 4 5})
#{4 5}
```
## srange
`(srange start end)`