(defn new-gen [a]
  (loop [a a t (transient [])]
    (if (empty? a)
        (distinct #(= (:val %1) (:val %2)) (persistent! t))
        (let [f (first a)]
          (recur (rest a)
            (loop [c [(transform-left f) (transform-right f)] t t]
              (if (empty? c)
                t
                (let [n (first c)]
                  (if-not (contains? #(= (:val n) %) (map :val (parents n)))
                    (recur (rest c) (conj! t n))
                    (recur (rest c) t))))))))))

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to