scala> List(1, 2, 3) remove (_ < 2) <console>:8: warning: method remove in class List is deprecated: use `filterNot' instead List(1, 2, 3) remove (_ < 2) ^ res0: List[Int] = List(2, 3)
I donβt understand why this is out of date. Being immutable, it should be clear that remove will return a new list. In scaladoc you can only find:
Deprecated: use filterNot 'instead
source share