Skip to content

Replace removeFirst with removeHead in ArrayDeque documentation#10296

Merged
SethTisue merged 1 commit intoscala:2.13.xfrom
JD557:patch-1
Mar 13, 2023
Merged

Replace removeFirst with removeHead in ArrayDeque documentation#10296
SethTisue merged 1 commit intoscala:2.13.xfrom
JD557:patch-1

Conversation

@JD557
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Thank you João!

hamzaremmal pushed a commit to hamzaremmal/scala3 that referenced this pull request May 2, 2025
hamzaremmal pushed a commit to scala/scala3 that referenced this pull request May 7, 2025
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

Development

Successfully merging this pull request may close these issues.

3 participants