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
Option.flatten should return Option, not List #4474
Comments
Imported From: https://issues.scala-lang.org/browse/SI-4474?orig=1 |
@paulp said: |
@paulp said: |
@SethTisue said: |
gerferra said:
"workaround":
|
@paulp said: |
gerferra said: |
currently Option only has flatten via implicit conversion to Iterable, so:
I was hoping to get Some(3) back, not List(3).
flatten (or join, I don't have an opinion on the right name) seems like an essential operation to have on monadic types like Option.
see also #661. it was closed as wontfix, but I think that's because Tony was suggesting adding lots of methods, not just this one.
The text was updated successfully, but these errors were encountered: