0.8.4-SNAPSHOT Arrow_down_16x16



  • (handle-clause as)

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 cljs/core/logic/macros.clj:304 top

(defn handle-clause [as]
  (when-not (vector? as)
    (throw (Exception. (str "Expecting vector of arguments, instead " as))))
  (fn [[p & exprs]]
    (when-not (vector? p)
      (throw (Exception. (str "Expecting vector of matches, instead " p))))
    (when-not (= (count p) (count as))
      (warn "Differing number of matches. Matching" p "against" as))
    (let [pas (partition 2 (interleave p as))
          r (ex* pas exprs #{})]
      (if (all-blank? p)
        (list r)))))
Vars in cljs.core.logic.macros/handle-clause:
Used in 0 other vars

Comments top

No comments for handle-clause. Log in to add a comment.