                                identity)))
 
 (defn- association-rules
-  "Returns all association rules of context with the parameters minsupp as minimal support and
-  minconf as minimal confidence. The result returned is a lazy sequence."
+  "Returns all association rules of context with the parameters minsupp as
+  minimal support and minconf as minimal confidence. The result returned is a
+  lazy sequence."
   ;; UNTESTED!
   [context minsupp minconf]
   (let [fitemsets (frequent-itemsets context minsupp)]

                  (close-under-implications impl-set A)))))

(defn irredundant-subset
  "Given a set impls of implications, returns an irredundant subset of impls.  Note that
  this set does not need to be of minimal cardinality."
  [impls]
  (reduce (fn [impls impl]
            (if (follows-semantically? impl impls)


(defn canonical-base
  "Returns the canonical base of given context, as a lazy sequence.  Uses
  «background-knowledge» as starting set of implications, which will not appear
  in the result.  If «predicate» is given (a function), computes only those
  implications from the canonical base whose premise satisfy this predicate,
  i.e. «predicate» returns true on these premises.  Note that «predicate» has to
  satisfy the same conditions as the predicate to «next-closed-set-in-family»."
  ([ctx]
     (canonical-base ctx #{} (constantly true)))
  ([ctx background-knowledge]
