Skip to content


Subversion checkout URL

You can clone with
Download ZIP
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...
commit 9bc6eb42be28bfd2b493657344f6eea8f5ed657c 1 parent 09131fc
@abrooks abrooks authored David Nolen committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/main/clojure/clojure/core/logic.clj
2  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)))]
Please sign in to comment.
Something went wrong with that request. Please try again.