             (sorted-map)))))
 
 (defn decode
+  "Convert a v3 source map JSON object into a nested sorted map 
+   organized as file, line, and column."
   ([source-map]
      (decode (:mappings source-map) source-map))
   ([mappings source-map]

    :name   (when-let [name (-> seg meta :name)]
              (nth (:names source-map) name))}))

(defn seg-combine [seg relseg]
  (let [[gcol source line col name] seg
        [rgcol rsource rline rcol rname] relseg
        nseg [(+ gcol rgcol)

      (with-meta nseg {:name (+ name rname)})
      nseg)))

(defn update-result
  "Helper for decode. Take an internal source map representation
   organized as nested sorted maps mapping file, line, and column
   and update it based on a segment map and generated line number."
  [result segmap gline]
  (let [{:keys [gcol source line col name]} segmap
        d {:gline gline
           :gcol gcol}
