• (<- hd & body)
Build a datalog rule. Like this:

(<- (:head :x ?x :y ?y) (:body-1 :x ?x :y ?y) (:body-2 :z ?z) (not! :body-3 :x ?x) (if > ?y ?z))

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/rules.clj:67 top

(defmacro <-
  "Build a datalog rule.  Like this:

   (<- (:head :x ?x :y ?y) (:body-1 :x ?x :y ?y) (:body-2 :z ?z) (not! :body-3 :x ?x) (if > ?y ?z))"
  [hd & body]
  (let [head (build-atom hd :clojure.contrib.datalog.literals/literal)
        body (map build-literal body)]
    `(is-safe? (build-rule ~head [~@body]))))
Vars in clojure.contrib.datalog.rules/<-: defmacro let apply concat list seq vector
Used in 0 other vars

Comments top

No comments for <-. Log in to add a comment.