   [[var bitset] & body]
   `(loop [~var (int (.nextSetBit ~bitset 0))]
      (cond
-       (== -1 ~var)
-       true,
-       (not ~@body)
-       false,
-       :else
-       (recur (.nextSetBit ~bitset (inc ~var))))))
+       (== -1 ~var) true,
+       (not ~@body) false,
+       :else (recur (.nextSetBit ~bitset (inc ~var))))))
 
 (defmacro dobits
-  ""
+  "Executes body for every bit set in bitset. Var gets bound to the
+  current location of the bit. Before every iteration, end-test (if
+  given) is tested and the loop is stopped if it returns true."
   [[var bitset & end-test] & body]
-  `(let [#^BitSet bitset# ~bitset]
+  `(let [^BitSet bitset# ~bitset]
      (loop [~var (int (.nextSetBit bitset# 0))]
-       (if (or (== -1 ~var)
-	       ~@end-test)
-	 nil
-	 (do
-	   ~@body
-	   (recur (int (.nextSetBit bitset# (inc ~var)))))))))
+       (if (or (== -1 ~var) ~@end-test)
+         nil
+         (do
+           ~@body
+           (recur (int (.nextSetBit bitset# (inc ~var)))))))))
 
 (defn filter-bitset
   "Returns a new bitset of all bits in bitset for which predicate returns true."

  (:use [clojure.contrib.seq-utils :only (indexed)])
  (:use [conexp.fca.contexts :only (objects attributes incidence)]))


;(set! *warn-on-reflection* true)

;;; Helpers to convert to and from BitSets


     ~@body))

(defn bitwise-object-derivation
  "Implements object derivation for BitSets."
  [incidence-matrix, object-count, attribute-count, ^BitSet bitset]
  (let [^BitSet derived-attributes (BitSet. attribute-count)]
    (dotimes [att (int attribute-count)]
      (when (forall-in-bitset [obj bitset]
              (== 1 (deep-aget ints incidence-matrix obj att)))
        (.set derived-attributes att)))
    derived-attributes))

(defn bitwise-attribute-derivation
  "Implements attribute derivation for BitSets."
  [incidence-matrix, object-count, attribute-count, ^BitSet bitset]
  (let [^BitSet derived-objects (BitSet. object-count)]
    (dotimes [obj (int object-count)]
      (when (forall-in-bitset [att bitset]
              (== 1 (deep-aget ints incidence-matrix obj att)))
        (.set derived-objects obj)))
    derived-objects))

;;;

(set! *warn-on-reflection* false)

;;;

nil
