   [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
+        maximals (atom []),
+        search   (fn search [current i]
                    ;; invariant: current is always a set with the same
                    ;; intent as initial-set
                    (if (>= i (count elements))

                     (let [next (disj current (elements i))]
                       (if (not= (context-attribute-closure ctx next)
                                 intent)
                         (swap! result conj next)
                         (search next (inc i)))
                       (search current (inc i)))))]
    (search initial-set 0)
    @result))

(defn context-attribute-quasiclosure
  "Computes the quasiclosure of set in context ctx."

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

;;;

