   connection defined by the given session. Takes an optional
   configuration map describing request `options` and `variables`,
   desired `shape` of the result, and overrides of default type
-  conversion in `xcc-type->conv-fn`.
+  conversion in `xml-type-str->conv-fn`.
 
   Options passed must be in `valid-request-options` and conform to
   `request-options`.

  MarkLogic query result sequence. Default type mappings can be
  overridden (in part or in whole) with the optional parameter
  `type-mapping`, which should contain a transformation function keyed
  by an XCC type string. See `xcc-type->conv-fn` above."
  [result-sequence & [type-mapping]]
  ;; TODO throw informative exception if type not found in types
  (map (fn [item] (((merge xcc-type->conv-fn
                          (when (map? type-mapping)
                            type-mapping))
                   (.toString (.getValueType item))) item))

                                      (variable-types type)
                                      (if as-is?
                                        value
                                        ((xcc-type->xdm-conv-fn type) value)))
                     (.setNewVariable acc (name vname)
                                      (variable-types type)
                                      (if as-is?
                                        value
                                        ((xcc-type->xdm-conv-fn type) value))))))
               acc)
             (doto request-factory (.setOptions (make-request-options options)))
             variables))
