0.8.4-SNAPSHOT Arrow_down_16x16
  • (in & xs-and-dom)
Assign vars to domain. The domain must come last.

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/core/logic/fd.clj:669 top

(defmacro in
  "Assign vars to domain. The domain must come last."
  [& xs-and-dom]
  (let [xs (butlast xs-and-dom)
        dom (last xs-and-dom)
        domsym (gensym "dom_")]
    `(let [~domsym ~dom]
      (fresh []
        ~@(map (fn [x]
                 `(dom ~x ~domsym))
               xs)))))
Vars in clojure.core.logic.fd/in:
Used in 0 other vars

Comments top

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