0.8.4-SNAPSHOT Arrow_down_16x16

mark-clauses

clojure.core.logic.dcg

  • (mark-clauses cs)
  • (mark-clauses [c & r :as cs] i)

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/dcg.clj:49 top

(defn mark-clauses
  ([cs] (mark-clauses cs (atom 0)))
  ([[c & r :as cs] i]
     (cond
      (nil? (seq cs)) ()
      (fresh-expr? c) (cons `(fresh ~(second c)
                          ~@(mark-clauses (drop 2 c) i))
                       (mark-clauses r i))
      (!dcg? c) (cons c (mark-clauses r i))
      :else (cons (with-meta c
                    {:index (swap! i clojure.core/inc)})
                  (mark-clauses r i)))))
Vars in clojure.core.logic.dcg/mark-clauses:
Used in 0 other vars

Comments top

No comments for mark-clauses. Log in to add a comment.