Permalink
Browse files

retractions: Fix bug converting 'set from PersistentHashSet to LazySeq.

This issue does not affect external correctness but will adversely
affect performance in the presence of duplicated facts.
  • Loading branch information...
1 parent 09131fc commit 9bc6eb42be28bfd2b493657344f6eea8f5ed657c @abrooks abrooks committed with David Nolen Sep 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/clojure/clojure/core/logic.clj
@@ -2769,7 +2769,7 @@
(let [rel-ns (:ns (meta rel))
rel-set (var-get (ns-resolve rel-ns (set-sym (.name rel) arity)))
tuples (map vec tuples)]
- (swap! rel-set (fn [s] (remove #(some #{%} tuples) s)))
+ (swap! rel-set (fn [s] (reduce disj s tuples)))
(let [indexes (indexes-for rel arity)]
(doseq [[o i] indexes]
(let [index (var-get (ns-resolve rel-ns (index-sym (.name rel) arity o)))]

0 comments on commit 9bc6eb4

Please sign in to comment.