-
-
Notifications
You must be signed in to change notification settings - Fork 324
Add LinkedList Operators and Update Tests #2438
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # lib/std/core/array.c3
…return a direct array view.
Collaborator
|
I changed it a bit to drop the random access, because that's hinting at a contract that's simply bad. So instead it's just returning an array_view which is that iterator, since it then can be used for general access. That makes it more obvious what's happening. The only thing I'm not happy about is that |
NotsoanoNimus
added a commit
to NotsoanoNimus/c3c
that referenced
this pull request
Oct 9, 2025
* Add LinkedList Operators and Update Tests * add linkedlist printing and `@new` macros (single-line init and pool-capable) * add linkedlist node and reg iterator; comparisons w/ == * Fix benchmarks. Drop random access to the linked list using []. Only return a direct array view. --------- Co-authored-by: Christoffer Lerno <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Noticed recently that LinkedList is a bit crusty. Updated it with some operator overloads and some other quality-of-life methods.
It's probably not well-advised to use
foreach_ron this structure as it would be quite expensive. I don't know of a way to explicitly override that behavior to start from the tail of the list.Also updated the corresponding unit tests to use the more "standard"
test::functions, as well as addedLinkedListcapability tests to some corearray::functions.