Skip to content
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

Replace removeFirst with removeHead in ArrayDeque documentation #10296

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

JD557
Copy link
Contributor

@JD557 JD557 commented Feb 5, 2023

The ArrayDeque documentation mentions:

Append, prepend, removeFirst, removeLast and random-access (indexed-lookup and indexed-replacement) take amortized constant time.

However, removeFirst is defined as: def removeFirst(p: A => Boolean, from: Int): Option[A] (which obviously won't take constant time).
This should have been removeHead, which mirrors removeLast (including the *Option and *While variants).

@scala-jenkins scala-jenkins added this to the 2.13.11 milestone Feb 6, 2023
@SethTisue SethTisue added the documentation No code change. Only documentation label Feb 8, 2023
@SethTisue SethTisue requested a review from a team February 8, 2023 17:04
@SethTisue SethTisue added the library:collections PRs involving changes to the standard collection library label Feb 20, 2023
@SethTisue
Copy link
Member

SethTisue commented Feb 20, 2023

ping @scala/collections, can somebody sanity check this?

@SethTisue SethTisue merged commit ed80170 into scala:2.13.x Mar 13, 2023
@SethTisue
Copy link
Member

Thank you João!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation No code change. Only documentation library:collections PRs involving changes to the standard collection library
Projects
None yet
3 participants