               (try-re expected actual re-matches)
             
               (same-lengths? actual expected)
-              (apply actual-x-contains? [actual expected looseness])
+              (match? actual expected looseness)
 
               :else
               (tag-as-chatty-falsehood

;;


(defn match? [midje-classification actual expected looseness]
  (let [comparison (compare-results midje-classification actual expected looseness)]
    (or (total-match? comparison)
        (apply noted-falsehood
               (cons (best-actual-match midje-classification comparison)
                     (best-expected-match midje-classification comparison expected))))))


(defn- actual-x-contains? [actual expected looseness]
  (match? (midje-classification actual) actual expected looseness))

(defn- add-actual [actual result]
  (if (chatty-checker-falsehood? result)
    (merge result {:actual actual})
    result))
  

;; The interface

(defn- container-checker-maker [name checker-fn]

(defn chatty-checker-falsehood? [value]
  (:midje/chatty-checker-falsehood (meta value)))

(defn- add-actual [actual result]
  (if (chatty-checker-falsehood? result)
    (merge result {:actual actual})
    result))
  
(defn chatty-checker? [fn]
  (:midje/chatty-checker (meta fn)))

