   (let [intents (titanic (attributes context)
                          (supports context minsupp)
                          1.0
-                         #(apply min %))]
+                         <=)]
     (if (<= (* (count (objects context)) minsupp)
             (count (attribute-derivation context (attributes context))))
       intents

(defn titanic
  "Implements the titanic algorithm. weigh must return for a
  collection of sets a hash-map mapping every set to its weight, with
  max-weight being the maximal weight possbile. weight-minimum is a
  function of one argument being a sequence of weights and returning
  the minimal of those."
  [base-set weigh max-weight weight-minimum]
  (binding [closure       {},
            set-weight    (weigh [#{}]),
            subset-weight (partial subset-weight max-weight),
            minimum       weight-minimum]

    (loop [key-set    #{#{}},
           candidates (set-of #{m} [m base-set]),

        Y))))

(defn- titanic-generate
  "Computes the next candidate set. Note that the variables «closure»
  and «set-weight» have to be rebound."
  [base-set key-set]
  (set-of next [A key-set,
                m (difference base-set A),
