-
-
Couldn't load subscription status.
- Fork 299
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
Conversation
# Conflicts: # lib/std/core/array.c3
…return a direct array view.
|
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 |
* 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]>
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.