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

refactor: add cmp function on arraylists #32

Open
callumgran opened this issue Jun 13, 2023 · 0 comments
Open

refactor: add cmp function on arraylists #32

callumgran opened this issue Jun 13, 2023 · 0 comments

Comments

@callumgran
Copy link
Contributor

In adding a comparison function that returns a signed integer, you can write more efficient and more complex functions for testing equality and even sorting of elements in the arraylist.

This would allow f.eks for arraylist_sort() that is a wrapper for qsort or another sort function that would then just use the cmp function from the arraylist.

This also makes it easier to find the correct item in the arraylist if thou so wish.

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

1 participant