News for hackers. Stuff that matters.
Re:Ask HN: What is the most beautiful piece of code you've e... by ridiculous_fish on Monday October 28, 2019 @01:53AM (#21374605)
Unfortunately it's also incorrect! It discards NaNs, as they are neither < nor >=.
Re:Ask HN: What is the most beautiful piece of code you've e... by maweki on Monday October 28, 2019 @03:02AM (#21374858)
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.
Re:Ask HN: What is the most beautiful piece of code you've e... by fulafel on Monday October 28, 2019 @02:55AM (#21374826)
I would argue that this is better than most alternatives.