Hello
(cl.ext.dacf.unification:unify #T(list 3 4) '(3 )) will result in an error.
I don't really understand the following code but i think the problem is in "(unify (subseq a 0 (list-length vars)) vars env))". I don't know how to fix this right.
A temporary solution could be to do something like
(when (< (length a) (length vars)) (error 'unification-failurse))
Greetings
Norman
(defmethod unify ((a list) (b sequence-template) &optional (env (make-empty-environment))) (let ((template-lambda-list (sequence-template-lambda-list b)) (ll (list-length a)) ) (multiple-value-bind (vars optionals keys rest) (parse-extended-ordinary-lambda-list template-lambda-list :ordinary-variable-test #'valid-template-p :optional-variable-test #'valid-template-p :key-variable-test #'valid-template-p :rest-variable-test #'valid-template-p)
(let* ((n-vars (list-length vars)) (n-optionals (list-length optionals)) (env (unify (subseq a 0 (list-length vars)) vars env))) (when (and optionals (>= ll (+ n-vars n-optionals))) (setf env (unify (subseq a n-vars (+ n-vars n-optionals)) optionals env))) (when (and rest (>= ll (+ n-vars n-optionals))) (setf env (unify (subseq a (+ n-vars n-optionals)) (first rest) env))) (when keys (warn "Sorry mathcing of keywords ~S not yet implemented." keys)) env)))) _________________________________________________________________________ Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179