-
Notifications
You must be signed in to change notification settings - Fork 21
Map.remove to return removed value #46
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-46?orig=1 |
@mcdirmid said: I don't think we should add these methods to immutable maps, the APIs are already complicated enough without multi-return values. Temporary workaround: val params: jcl.HashMap[String, String] = ... val force = params.removeKey("force").isDefined if (!params.isEmpty) throw new Exception("unknown parameters: " + |
@mcdirmid said: |
@odersky said: |
mutable.Map should have method
immutable.Map should have method
Use case for mutable.Map:
The text was updated successfully, but these errors were encountered: