Skip to content

Recursive call in unification.cljs doesn't have enough arguments #83

@NicMcPhee

Description

@NicMcPhee

The recursive call in the last line of

(defn recursive-validate
    "validates each step in order, returning an array of boolean values corresponding to the rules, in order"
     [exps rules steps]
       (cond
             ;if one expression and 0 rules are left, all expressions and rules validated
             (and (= 1 (count exps)) (empty? rules)) '()
             ;if only one list is empty, something is wrong
             (or (>= 1 (count exps)) (empty? rules)) (throw (js/Error. "Mismatched expression and rules lists' lengths"))
             (and (= (first steps) "⇒") (check-match (nth exps 0) (nth exps 1) (nth rules 0) (nth rules 1)))
                (cons true (recursive-validate (rest exps) (rest (rest rules)) (rest steps)))
             (and (= (first steps) "≡")
                  (true? (check-match-recursive (nth exps 0) (nth exps 1) (nth rules 0) (nth rules 1))))
                (cons true (recursive-validate (rest exps) (rest (rest rules)) (rest steps)))
             ;if check-match-recursive didn't return true, end the computation
             :else (cons false (recursive-validate (rest exps) (rest (rest rules))))))

from unification.cljs doesn't have enough arguments. Not clear if this is a bug or not, but someone should look into that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions