(update-children-reduced ast f)
(update-children-reduced ast f reversed?)
Like update-children but returns a reduced holding the AST if f short-circuited.
Source
(defn update-children-reduced
"Like update-children but returns a reduced holding the AST if f short-circuited."
([ast f] (update-children-reduced ast f false))
([ast f reversed?]
(if (and (not (reduced? ast))
(:children ast))
(let [ret (-update-children ast f reversed?)]
(if (reduced? ret)
(reduced (persistent! @ret))
(persistent! ret)))
ast)))