           columns)]
     (named-matrix rows cols m')))
 
+; Just trying to figure out how the hell function checking really works... 
+(require '[clojure.spec.test.alpha :as stest])
+(stest/check `zero-out-columns)
+
+
+(s/fdef whatever
+  :args (s/cat :x (s/and number? #(not= ##NaN %) #(not= 0 %)))
+  :ret number?
+  :fn #(= (-> % :ret (* 2) (-> % :args :x))))
+(defn whatever
+  [x]
+  (/ 2 x))
+
+;(gen/sample (s/gen number?))
+(stest/check `whatever)
+
+
+
 
 (defn named-matrix-reader
   [{:keys [rownames colnames matrix]}]

    (or matrix [[]])))


(s/def ::NamedMatrix
  (s/with-gen
    (s/and
      (partial satisfies? PNamedMatrix)
      ;(comp get-matrix matrix/matrix?)
      (comp rownames matrix/vec?)
      (comp colnames matrix/vec?)
      (comp rownames distinct)
      (comp colnames distinct))
    ;; Silly... need way smarter generators here; And maybe actually the generator shouldn't be on this entity, since a named
    ;(clojure.test.check.generators/elements)
    #(gen/elements #{(named-matrix [1 2 3] [1 2 3] [[0 -1 -1] [0 1 -1] [1 -1 -1]])
                     (named-matrix [3 1 2] [3 1 2] [[0 nil -1] [0 1 -1] [1 nil 1]])})))

;; Not sure why I'm not able to excercise this?
;(gen/generator (s/gen ::NamedMatrix))
;(s/valid?
;  ::NamedMatrix
;  (gen/generate
;    (gen/elements #{(named-matrix [1 2 3] [1 2 3] [[0 -1 -1] [0 1 -1] [1 -1 -1]])
;                    (named-matrix [3 1 2] [3 1 2] [[0 nil -1] [0 1 -1] [1 nil 1]])})))
;(gen/generate (s/gen ::NamedMatrix))
;(s/exercise ::NamedMatrix)


(defmethod print-method NamedMatrix

      " :matrix " (get-matrix nm)
      "}")))

;(gen/sample (s/gen (s/cat :nm ::NamedMatrix :columns coll?)))

(s/fdef zero-out-columns
  :args (s/cat :nm ::NamedMatrix :columns coll?)
  :ret ::NamedMatrix)

(defn zero-out-columns
  "Creates a new rating matrix which has had the specied columns zeroed out"
