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

add *inPlace compatibility for 2.12. #90

Open
MasseGuillaume opened this issue Jul 10, 2018 · 3 comments
Open

add *inPlace compatibility for 2.12. #90

MasseGuillaume opened this issue Jul 10, 2018 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed library Related to compat library code (not rewrite rules)

Comments

@MasseGuillaume
Copy link
Contributor

for example: mutable.Set.filterInPlace

@MasseGuillaume
Copy link
Contributor Author

MasseGuillaume commented Aug 20, 2018

  • library/scala/collection/ArrayOps.scala:

    • def mapInPlace(f: A => A): Array[A]
  • library/scala/collection/mutable/Buffer.scala:

    • def patchInPlace(from: Int, patch: scala.collection.Seq[A], replaced: Int): this.type
    • def dropInPlace(n: Int): this.type
    • def dropRightInPlace(n: Int): this.type
    • def takeInPlace(n: Int): this.type
    • def takeRightInPlace(n: Int): this.type
    • def sliceInPlace(start: Int, end: Int): this.type
    • def dropWhileInPlace(p: A => Boolean): this.type
    • def takeWhileInPlace(p: A => Boolean): this.type
    • def padToInPlace(len: Int, elem: A): this.type
    • def flatMapInPlace(f: A => IterableOnce[A]): this.type
    • def filterInPlace(p: A => Boolean): this.type
    • def patchInPlace(from: Int, patch: scala.collection.Seq[A], replaced: Int): this.type
  • library/scala/collection/mutable/IndexedSeq.scala:

    • def mapInPlace(f: A => A): this.type
  • library/scala/collection/mutable/ListBuffer.scala:

    • def mapInPlace(f: A => A): this.type
    • def flatMapInPlace(f: A => IterableOnce[A]): this.type
    • def filterInPlace(p: A => Boolean): this.type
    • def patchInPlace(from: Int, patch: collection.Seq[A], replaced: Int): this.type
  • library/scala/collection/mutable/Map.scala:

    • @deprecated("Use filterInPlace instead", "2.13.0") def retain(p: (K, V) => Boolean): this.type = filterInPlace(p)
    • def filterInPlace(p: (K, V) => Boolean): this.type
    • @deprecated("Use mapValuesInPlace instead", "2.13.0") def transform(f: (K, V) => V): this.type = mapValuesInPlace(f)
    • def mapValuesInPlace(f: (K, V) => V): this.type
  • library/scala/collection/mutable/OpenHashMap.scala:

    • def mapValuesInPlace(f : (Key, Value) => Value): this.type
    • def filterInPlace(f : (Key, Value) => Boolean): this.type
  • library/scala/collection/mutable/PriorityQueue.scala:

    • def mapInPlace(f: A => A): this.type
  • library/scala/collection/mutable/Seq.scala:

    • @deprecated("Use mapInPlaceon anIndexedSeq instead", "2.13.0") @inline final def transform(f: A => A): this.type
  • library/scala/collection/mutable/Set.scala:

    • @deprecated("Use filterInPlace instead", "2.13.0") def retain(p: A => Boolean): Unit = filterInPlace(p)
    • def filterInPlace(p: A => Boolean): this.type
  • library/scala/collection/mutable/StringBuilder.scala:

    • @deprecated("Use reverseInPlace instead", "2.13.0") final def reverseContents(): this.type = reverseInPlace()
    • def reverseInPlace(): this.type
  • library/scala/collection/mutable/UnrolledBuffer.scala:

    • def mapInPlace(f: T => T): this.type
    • def patchInPlace(from: Int, patch: scala.collection.Seq[T], replaced: Int): this.type

Blocked:

  • library/scala/collection/convert/Wrappers.scala: (*InPlace operations on collection.convert.Wrappers bug#11092)

    • def flatMapInPlace(f: A => scala.collection.IterableOnce[A]): this.type
    • def patchInPlace(from: Int, patch: scala.collection.Seq[A], replaced: Int): this.type
    • def filterInPlace(p: A => Boolean): this.type
    • def mapInPlace(f: A => A): this.type
  • library/scala/collection/mutable/ArrayBuffer.scala:

    • def sortInPlace[B >: A]()(implicit ord: Ordering[B]): this.type (2.13.0-M5)
  • library/scala/collection/mutable/ArraySeq.scala:

    • def sortInPlace[B >: T]()(implicit ord: Ordering[B]): this.type (2.13.0-M5)
  • library/scala/collection/mutable/IndexedSeq.scala:

    • def sortInPlace[B >: A]()(implicit ord: Ordering[B]): this.type (2.13.0-M5)
    • def sortInPlaceWith(lt: (A, A) => Boolean): this.type (2.13.0-M5)
    • def sortInPlaceBy[B](f: A => B)(implicit ord: Ordering[B]): this.type (2.13.0-M5)

@SethTisue SethTisue modified the milestones: Week 33, 2.13.0-RC1 Sep 18, 2018
@szeiger szeiger added the library Related to compat library code (not rewrite rules) label Apr 5, 2019
@dwijnand dwijnand removed this from the 2.13.0-RC1 milestone Jun 21, 2019
@leleogere
Copy link

These methods would be very extremely useful!

@SethTisue SethTisue added the help wanted Extra attention is needed label Jul 27, 2022
@SethTisue SethTisue added the good first issue Good for newcomers label Oct 28, 2022
@SethTisue
Copy link
Member

SethTisue commented Oct 28, 2022

I've labeled this as "good first issue" because these can be added one at a time — a PR that only added some of them would still be mergeable.

martijnhoekstra pushed a commit to martijnhoekstra/scala-collection-compat that referenced this issue Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed library Related to compat library code (not rewrite rules)
Projects
None yet
Development

No branches or pull requests

6 participants