       set
       (recur ctx quasiclosure))))
 
+(defn quasi-intents
+  "Returns the quasi-closed sets of attributes of the given context
+  ctx."
+  [ctx]
+  (all-closed-sets (attributes ctx)
+                   #(context-attribute-quasiclosure ctx %)))
+
 (defn quasi-stem-base
   "Returns the base of implications with quasiclosed premise."
   [ctx]

  [ctx initial-set]
  (let [elements (vec initial-set),
        intent   (context-attribute-closure ctx initial-set),
        result   (atom []),
        search   (fn search [current i] ;this yields more than the direct generators
                   ;; invariant: current is always a set with the same
                   ;; intent as initial-set
                   (if (>= i (count elements))

                      (make-implication set
                                        (context-attribute-closure ctx set)))))
           #{}
           (quasi-intents ctx)))

;;;

