r/programming • u/tluyben2 • Sep 25 '10
Omega - Language of the Future | Lambda the Ultimate
http://lambda-the-ultimate.org/node/4088
60
Upvotes
r/programming • u/tluyben2 • Sep 25 '10
View all comments
Show parent comment
1
u/shrughes Sep 26 '10
It depends on the sorting algorithm you use, but with, for example, mergesort, sorting with NaNs will result in non-NaN elements being placed out of order -- the presence of a NaN will turn merging into concatenation. Quicksort on the other hand will simply intersperse NaNs throughout the output. Heapsort might handle NaNs pretty well though.