Added path to navigate to atom value

This commit is contained in:
Rakesh 2016-05-07 22:40:21 +05:30
parent 03f6a12baa
commit 7b33c93132

View file

@ -279,6 +279,17 @@
(assoc structure key (next-fn (get structure key)))
))
(defpath
^{:doc "Navigates to atom value."}
atompath
[]
(select* [this structure next-fn]
(next-fn @structure))
(transform* [this structure next-fn]
(do
(reset! structure (next-fn @structure))
structure)))
(defpath
^{:doc "Navigates to the key only if it exists in the map."}
must