Maps could implicitly act as a filter function checking the structure of the value in question, e.g.: {:type "a"} could stay navigated only if the value for the :type key is "a". Likewise, {:k1 {:k2 "b"} :k3 "c"} would check two values, one of them being nested in another map. This is a common use case for which selected? is more verbose than an anonymous function.
This navigator should also work properly with locals in the closure, such as {:type some-local}.
Maps could implicitly act as a filter function checking the structure of the value in question, e.g.:
{:type "a"}
could stay navigated only if the value for the:type
key is"a"
. Likewise,{:k1 {:k2 "b"} :k3 "c"}
would check two values, one of them being nested in another map. This is a common use case for whichselected?
is more verbose than an anonymous function.This navigator should also work properly with locals in the closure, such as
{:type some-local}
.