Skip to content

Commit

Permalink
[stdlib] Extended Linked List cleanup and fixups
Browse files Browse the repository at this point in the history
Minor tweaks, mostly consisting of removing unnecessary things like some
leftover debug prints and explicit type parameters. Also adds time
complexity information to all public methods of `LinkedList`.

Signed-off-by: Owen Hilyard <[email protected]>
  • Loading branch information
owenhilyard committed Jan 24, 2025
1 parent 79208d3 commit 772dbbe
Show file tree
Hide file tree
Showing 6 changed files with 246 additions and 151 deletions.
38 changes: 38 additions & 0 deletions stdlib/src/builtin/value.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,41 @@ trait BoolableKeyElement(Boolable, KeyElement):
"""

pass


trait EqualityComparableWritableCollectionElement(
WritableCollectionElement, EqualityComparable
):
"""A trait that combines the CollectionElement, Writable and
EqualityComparable traits.
This trait requires types to implement CollectionElement, Writable and
EqualityComparable interfaces, allowing them to be used in collections,
compared, and written to output.
"""

pass


trait WritableCollectionElementNew(CollectionElementNew, Writable):
"""A trait that combines the CollectionElement and Writable traits.
This trait requires types to implement both CollectionElement and Writable
interfaces, allowing them to be used in collections and written to output.
"""

pass


trait EqualityComparableWritableCollectionElementNew(
WritableCollectionElementNew, EqualityComparable
):
"""A trait that combines the CollectionElement, Writable and
EqualityComparable traits.
This trait requires types to implement CollectionElement, Writable and
EqualityComparable interfaces, allowing them to be used in collections,
compared, and written to output.
"""

pass
Loading

0 comments on commit 772dbbe

Please sign in to comment.