In core.logic
, is there a way to translate the outputs of a program like
(run 2 [q]
(fresh [a]
(featurec q {:foo a})
(membero a '(5))
(conde
((featurec q {:bar 2}))
((featurec q {:baz 2})))))
into the smallest maps that satisfy each solution's constraints, in this case {:foo 5, :bar 2}
and {:foo 5, :baz 2}
?
featurec
when the minimal set of keys is already known? Why not(== q {:foo a :bar 2})
? - Taylor Woodfeaturec
clauses might appear only in some solutions; e.g.,conde
clauses that each introduce differentfeaturec
constraints. I've updated the question to give an example of this. - Alex Lew