           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]}]

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



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

    (or matrix [[]])))



(defn named-matrix-gen-of
  [gen]
  (gen/bind
    (gen/tuple
      (gen/such-that not-empty (gen/vector-distinct (gen/such-that pos? (gen/int))))
      (gen/such-that not-empty (gen/vector-distinct (gen/such-that pos? (gen/int)))))
    (fn [[rownames colnames]]
      (gen/fmap
        (fn [matrix] (named-matrix rownames colnames matrix))
        (gen/vector
          (gen/vector gen (count colnames))
          (count rownames))))))

;(gen/sample (named-matrix-gen-of (s/gen #{-1 0 1 nil})))


(s/def ::NamedMatrix
  (s/with-gen
    (s/and
      (partial satisfies? PNamedMatrix)
      ;(comp get-matrix matrix/matrix?)
      (comp matrix/vec? rownames)
      (comp matrix/vec? colnames)
      (comp distinct rownames)
      (comp distinct colnames))
    ;; 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)
    #(named-matrix-gen-of (gen/double))))

;(gen/sample (s/gen ::NamedMatrix))


;(gen/frequency)
;(gen/double*)
;(gen/vector-of)
;(gen/sample (gen/double* {:min 0 :max 1 :NaN? false :infinite? false}) 100)


(defmethod print-method NamedMatrix
