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

[cl-compatible] Fix assoc :key and add *-if *-if-not functions #313

Merged
merged 1 commit into from
Aug 17, 2018

Conversation

Affonso-Gui
Copy link
Member

  1. Fix :key behaviour in assoc.
eus$ (assoc 3 '((1 . "one") (2 . "two") (3 . "three")) :key #'print)
(1 . "one")
(2 . "two")
(3 . "three")
;; nil

sbcl$ (assoc 3 '((1 . "one") (2 . "two") (3 . "three")) :key #'print)
1 
2 
3 
;; (3 . "three")
  1. Add :key :test :test-not key-parameters to rassoc.

  2. Implement assoc-if, assoc-if-not, rassoc-if, rassoc-if-not.

  3. Move superassoc and supermember to system::raw-assoc and system::raw-member, as in sequences.c.

Chart for assoc and rassoc tests:

Situation Results
before changes 55/104
with changes 80/104
with changes and eus-* auxiliary 91/104
including -if and -if-not tests 170/209

@Affonso-Gui Affonso-Gui changed the title Fix assoc :key and add *-if *-if-not functions [cl-compatible] Fix assoc :key and add *-if *-if-not functions Aug 10, 2018
@k-okada k-okada merged commit 7c9e621 into euslisp:cl-compatible Aug 17, 2018
@Affonso-Gui Affonso-Gui deleted the fix-assoc branch August 17, 2018 10:12
@Affonso-Gui Affonso-Gui restored the fix-assoc branch October 14, 2020 13:40
@Affonso-Gui Affonso-Gui deleted the fix-assoc branch October 14, 2020 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants