Closed demobox closed 11 years ago
See https://github.com/scalapuzzlers/scalapuzzlers.github.com/pull/65 for an updated version that is puzzling given the new 2.10.0 behaviour.
@nermin Since we're seeing that a number of people are still using 2.9, how about re-submitting this and adding it to the Archive? We'd obviously choose a different name from https://github.com/scalapuzzlers/scalapuzzlers.github.com/pull/65
Okay, I guess it won't hurt :)
Note that, as discussed in the scala-lang thread, this behaviour was changed in 2.10 as part of the fix for SI-5104:
https://github.com/scala/scala/commit/460bbc1276fb4ba83b9bcbdc7f7ba475b352b7c6
So this would unfortunately have to move straight to the archive section, although (again, as pointed out in the thread) there is a nice follow-up puzzler:
prints
1.0 2.0 NaN
in 2.9.2 but1.0 NaN 2.0
in 2.10.0 becauseDouble
now violates the assumptions ofOrdering
.