 ;; each split adds an extra key/value downstream that we may need to unwrap upstream
 (defn ccount [& [count-key]]
   (fn [[metadata-fn data-fn]]
-      (let [[#^Metadata src-metadata metaprefix extra-keys] (metadata-fn)
+      (let [[^Metadata src-metadata metaprefix extra-keys] (metadata-fn)
 	    dummy (trace (str "COUNT METADATA " metaprefix " " extra-keys))
 	    extra-attributes (map (fn [key] (.getAttribute src-metadata key)) extra-keys)
 	    tgt-metadata (count-reducer-metadata extra-keys count-key extra-attributes)]

     )))

(defn do-reduce-sum
  [#^String src-name #^Metadata src-metadata #^Metadata tgt-metadata sum-key #^Collection extra-values]
  (reducer src-name src-metadata tgt-metadata sum-key extra-values make-sum-reducer-strategy sum-value-key))

;; count specific stuff - should be in its own file

;;----------------------------------------
;; still to refactor - also sum()

(defn dtransform [^Model src-model ^String suffix key-key version-key & attribute-descrips]
  ;; TODO: accept ready-made View ?
  ;; TODO: default key/version from src-model
  (insert *metamodel* (apply do-transform suffix src-model key-key version-key attribute-descrips)))
