Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NicMcPhee opened this issue May 31, 2019 · 0 comments
Open

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

NicMcPhee opened this issue May 31, 2019 · 0 comments
Labels

Comments

@NicMcPhee
Copy link
Member

NicMcPhee commented May 31, 2019

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.

@NicMcPhee NicMcPhee added the bug label May 31, 2019
@NicMcPhee NicMcPhee added this to the End of June, 2019 milestone Jun 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant