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

assocのkey引数の取り扱いにバグがある. #436

Open
inabajsk opened this issue Jun 16, 2020 · 1 comment
Open

assocのkey引数の取り扱いにバグがある. #436

inabajsk opened this issue Jun 16, 2020 · 1 comment

Comments

@inabajsk
Copy link
Contributor

(assoc 'b '(((a) 1) ((b) 2)) :key #'car)
-> ((b) 2)
となるべきところ,
eusgl$ (assoc 'b '(((a) 1) ((b) 2)) :key #'car)
->nil
となる.現状では,
eusgl$ (assoc 'b '(((a) 1) ((b) 2)) :key #'caar)
->((b) 2)
とよけいにcarを与える必要があり,間違っている.

eus/lisp/c/lists.cのSUPERASSOC

if (key==NIL) temp=ccar(target);
else temp=call1(ctx,key,target);
のところが,
if (key==NIL) temp=ccar(target);
else temp=call1(ctx,key,ccar(target));
となれば,大丈夫なはず.

@Affonso-Gui
Copy link
Member

This problem has already been verified during the ansi-test project, and is fixed in the cl-compatible branch #313.

However, because it changes previous behavior it will need a lot of practical testing before we can actually include the fixes on the master branch.

(On a related note, this and others cl-compatible fixes are also included in my development branch for the resumption system, which I am planning to make available as another branch as soon as I can get it stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants