0.8.4-SNAPSHOT Arrow_down_16x16

unify-with-sequential*

clojure.core.logic

  • (unify-with-sequential* u v s)

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:865 top

(defn unify-with-sequential* [u v s]
  (cond
    (sequential? v)
    (if (and (counted? u) (counted? v)
          (not= (count u) (count v)))
      nil
      (loop [u u v v s s]
        (if (seq u)
          (if (seq v)
            (if-let [s (unify s (first u) (first v))]
              (recur (next u) (next v) s)
              nil)
            nil)
          (if (seq v) nil s))))
    
    (lcons? v) (unify-terms v u s)
    :else nil))
Vars in clojure.core.logic/unify-with-sequential*:
Used in 0 other vars

Comments top

No comments for unify-with-sequential*. Log in to add a comment.