       n
       ()))
   (cons [this [k v]]
-    (when-not (and (number? v)
-                   (<= 0 v 1))
+    (when-not (and (number? v) (<= 0 v 1))
       (illegal-argument "Fuzzy sets only support real values in [0,1]"))
     (if (zero? v)
       (Fuzzy-Set. (dissoc hashmap k))

;;;

(deftype Fuzzy-Set [^clojure.lang.APersistentMap hashmap]
  ;;
  Object
  (equals [this other]
    (boolean (or (identical? this other)
                 (when (= (class this) (class other))
                   (let [ohashmap (.hashmap ^Fuzzy-Set other)]
                     (and (forall [k (keys hashmap)]
                            (=> (not (zero? (hashmap k)))
                                (= (hashmap k) (ohashmap k))))
                          (forall [k (keys ohashmap)]
                            (=> (not (zero? (ohashmap k)))
                                (= (hashmap k) (ohashmap k))))))))))
  (hashCode [this]
    (hash-combine-hash Fuzzy-Set hashmap))
  (toString [this]

    (.entryAt hashmap o))
  (assoc [this k v]
    (.cons this [k v])))

;;; Constructors

(defmulti make-fuzzy-set
  "Constructs a fuzzy set from a given collection."
