0.8.4-SNAPSHOT Arrow_down_16x16
  • (master argv cache)
Take the argument to the goal and check that we don't
have an alpha equivalent cached answer term in the cache.
If it doesn't already exist in the cache add the new
answer term.

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.clj:2088 top

(defn master
  "Take the argument to the goal and check that we don't
   have an alpha equivalent cached answer term in the cache.
   If it doesn't already exist in the cache add the new
   answer term."
  [argv cache]
  (fn [a]
    (let [rargv (-reify a argv)]
      (when-not (-cached? @cache rargv)
        (swap! cache
          (fn [cache]
            (if (-cached? cache rargv)
              cache
              (-add cache (reify-tabled a argv)))))
        a))))
Vars in clojure.core.logic/master:
Used in 0 other vars

Comments top

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