0.8.4-SNAPSHOT Arrow_down_16x16



  • (count-clauses clauses)

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

(defn count-clauses [clauses]
  (if (fresh-expr? clauses)
    (count-clauses (drop 2 clauses))
    (reduce (fn [s c]
               (fresh-expr? c) (+ s (count-clauses (drop 2 c)))
               (!dcg? c) s
               :else (clojure.core/inc s)))
            0 clauses)))
Vars in clojure.core.logic.dcg/count-clauses:
Used in 0 other vars

Comments top

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