(defn magic-literal
"Create a magic version of this adorned predicate."
[l]
(assert (-> l :literal-type (isa? ::literal)))
(let [pred (literal-predicate l)
pred-map (if (map? pred) pred {:pred pred})
bound (get-adorned-bindings pred)
ntb (select-keys (:term-bindings l) bound)]
(assoc l :predicate (assoc pred-map :magic true) :term-bindings ntb :literal-type ::literal)))
Comments top
No comments for magic-literal. Log in to add a comment.