Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unfortunately it's also incorrect! It discards NaNs, as they are neither < nor >=.


In the example there was no talking about floating point numbers. The ordered type _has_ a total ordering as shown by the Ord typeclass restriction.


I would argue that this is better than most alternatives.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: