(update-reverse-result result segmap gline)
Helper for decode-reverse. Take a source map and update it
based on a segment map.
Source
(defn update-reverse-result
"Helper for decode-reverse. Take a source map and update it
based on a segment map."
[result segmap gline]
(let [{:keys [gcol source line col name]} segmap
d {:gline gline
:gcol gcol}
d (if name (assoc d :name name) d)]
(update-in result [source]
(fnil (fn [m]
(update-in m [line]
(fnil (fn [m]
(update-in m [col]
(fnil (fn [v] (conj v d))
[])))
(sorted-map))))
(sorted-map)))))