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

Vkm add some missing functions (#330) #334

Merged
merged 13 commits into from
Oct 21, 2018

Conversation

vlad-km
Copy link
Member

@vlad-km vlad-km commented Oct 15, 2018

What

  • sort (implementation only for lists, others in TODO) in list.lisp
  • set-difference in list.lisp
  • union in list.lisp
  • remove-duplicates in sequence.lisp
  • every in sequence.lisp replaced by more sequences version

Reasons

  • all of these functions are used in clos release
  • ANSI Compliance

Copy link
Member

@davazp davazp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few inline comments.

Also, as a general comment, please review the indentation and style to make sure it is consistent. I see 4 spaces in some functions, 1 in others. Let's use 2 spaces as we are using in other files 👍

src/list.lisp Outdated Show resolved Hide resolved
src/list.lisp Outdated
(defun union (list1 list2 &key key (test #'eq))
(cond ((and list1 list2)
(let ((result (makeset list2 :test #'equal)))
(dolist (it (makeset list1 :test #'equal))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you actually need makeset for the dolist? here? I don't think so. And it would probably be faster if you don't call it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
These are my cats on the keyboard ran :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About indentation - accepted. That's my fault.
In my standard uses lisp-body-indentation 4, but for JSCL PR I will use indent for 2 positions. Perhaps individual keywords will be with indented 1, sorry, each emacs has their own habits.

@vlad-km
Copy link
Member Author

vlad-km commented Oct 16, 2018

Thanks for review.
Im need some time for changes.

Copy link
Member

@davazp davazp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged. Thanks! One PR closer to CLOS 👍 😃

@davazp davazp merged commit 67c55e9 into jscl-project:master Oct 21, 2018
@vlad-km vlad-km deleted the vkm-add-some-missing-330 branch November 21, 2018 06:30
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

Successfully merging this pull request may close these issues.

2 participants