Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Make IQueue size O(1) #189

Merged
merged 6 commits into from
Jun 22, 2020
Merged

Make IQueue size O(1) #189

merged 6 commits into from
Jun 22, 2020

Conversation

nomisRev
Copy link
Member

Small improvement to IQueue.
It uses a property size to track the size of the Queue instead of relying the List implementation.

@@ -31,13 +38,10 @@ internal class IQueue<A> internal constructor(
else -> null
}

fun tail(): IQueue<A> =
Copy link
Member

Choose a reason for hiding this comment

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

👍

@nomisRev
Copy link
Member Author

Thanks for the review @JorgeCastilloPrz 🙌

@nomisRev nomisRev merged commit 7852390 into master Jun 22, 2020
@nomisRev nomisRev deleted the sv-iqueue-size branch June 22, 2020 18:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants