Skip to content

Linked list conformance to collection protocol #583

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

newboadki
Copy link
Contributor

Checklist

Description

Adds conformance to the standard library's Collection protocol for the LinkedList class.

Copy link
Member

@kelvinlauKL kelvinlauKL left a comment

Choose a reason for hiding this comment

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

I apologize for the long turnaround for this one. Great work!

I like having the tag as part of your custom index. Works well. I've left a comment in regards to the explicit getters you've written for the computed properties.

Looking forward to merging this in!

/// If the collection is empty, `startIndex` is equal to `endIndex`.
/// - Complexity: O(1)
public var startIndex: Index {
get {
Copy link
Member

Choose a reason for hiding this comment

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

The getter is implicit for all computed properties. No need to explicitly write get.

@yossan yossan mentioned this pull request Nov 25, 2017
@vincentngo
Copy link
Contributor

@kelvinlauKL are you going to merge this? Is this complete?

@kelvinlauKL kelvinlauKL merged commit abbe07a into kodecocodes:master Dec 20, 2017
@kelvinlauKL
Copy link
Member

Sorry, this fell off my radar. Merged. Thanks!

@newboadki newboadki deleted the linkedListConformanceToCollectionProtocol branch December 21, 2017 08:51
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.

3 participants