      (all-closed-sets-in-family predicate G clop #{}))
   ([predicate G clop initial]
      (let [G (if (set? G)
-	       (improve-basic-order G clop)
-	       G)]
+               (improve-basic-order G clop)
+               G)]
        (binding [subelts (memoize subelts)]
-	 (let [start (first (filter predicate (all-closed-sets G clop initial)))]
-	   (take-while identity
-		       (iterate (partial next-closed-set-in-family predicate G clop)
-				start)))))))
+         (let [start (first (filter predicate (all-closed-sets G clop initial)))]
+           (take-while identity
+                       (iterate (partial next-closed-set-in-family predicate G clop)
+                                start)))))))
 
 ;;; Common Math Algorithms
 

  [clop A]
  (let [clop-A (clop A)]
    (loop [left     [A],                ;yet to consider
           minimals []]                 ;minimals elements already found
      (if (empty? left)
        (distinct minimals)
        (let [next (first left)]


(ns conexp.base
  (:require clojure.set
            clojure.contrib.set
            clojure.contrib.math
            clojure.contrib.lazy-seqs
            clojure.contrib.def)
  (:use [clojure.contrib.ns-utils :only (immigrate)]))

(immigrate 'clojure.set
           'clojure.contrib.set
           'clojure.contrib.math
           'clojure.contrib.lazy-seqs
           'clojure.contrib.def)

(load "util")

