diff --git a/List-of-Navigators.md b/List-of-Navigators.md index a4358ff..5471812 100644 --- a/List-of-Navigators.md +++ b/List-of-Navigators.md @@ -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)`