• (magic-literal l)
Create a magic version of this adorned predicate.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/datalog/literals.clj:285 top

(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)))
Vars in clojure.contrib.datalog.literals/magic-literal: -> assert assoc defn isa? let
Used in 0 other vars

Comments top

No comments for magic-literal. Log in to add a comment.