-
Notifications
You must be signed in to change notification settings - Fork 87
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 SortedSet.unsorted
and SortedMap.unsorted
#95
Comments
I think a cross-compatible workaround would be to explicitly upcast the sorted set: |
I think this is cleaner: import compat._
TreeSet(1, 2).unsorted.map(f) |
Unfortunately, this rewrite is going to be in the Experimental. Once again we hit scalameta/scalameta#1212. Sorted collection have a special map functions that takes an ordering. The fallback |
I see. OK. |
Labeling as |
SortedSet.unsorted
and SortedMap.unsorted
SortedSet.map
in 2.12 returns aSet
if it cannot find an implicit Ordering. To keep this behavior in 2.13, you can useunsorted
. However, this method is not available in 2.12.The text was updated successfully, but these errors were encountered: