        (sign))))
 
 (defn update-exp [fn key exp]
-  {:pre [(fn? fn) (keyword? key) (map? @exp)]}
+  {:pre [(fn? fn) (keyword? key) (reftype? exp) (map? @exp)]}
   (reset! exp (assoc @exp key (fn (key @exp))))
   exp)
 
 (defn count-rate [pred fact exp]
-  {:pre [(= (Math/abs pred) (Math/abs fact) 1) (map? @exp)]}
+  {:pre [(= (Math/abs pred) (Math/abs fact) 1) (reftype? exp) (map? @exp)]}
   (match [pred fact]
     [ 1  1] (update-exp inc :TP exp)
     [ 1 -1] (update-exp inc :FP exp)


(defn evaluation
  ([results facts exp]
   {:pre [(coll? results) (coll? facts) (map? @exp)]}
   (let [numd (count results)]
     (confusion-matrix results facts exp))))


    [-1  1] (update-exp inc :FN exp)))

(defn confusion-matrix [preds facts exp]
  {:pre [(coll? preds) (coll? facts) (reftype? exp) (map? @exp)]}
  (if (or (empty? preds) (empty? facts))
    (let [TP (:TP @exp) FP (:FP @exp)
          TN (:TN @exp) FN (:FN @exp)]
