Fork me on GitHub

Here is a version

    [map? empty? :a (putval {}) :x NIL->VECTOR AFTER-ELEM (terminal-val 6)]
    [(must :a) vector? empty? BEFORE-ELEM (terminal-val {:x [6]})]
    [(must :a) vector? some? (nthpath 1) map? :x AFTER-ELEM  (terminal-val 6)])
Of course you could set more complex data with terminal-val (like setval), or swap out some of the navigation for clojure functions used with terminal (local transform function). And you could probably do it also with a normal cond + predicates, and a more simple navigation.