Re: [elm-discuss] List.sortBy browser dependance?

2016-07-13 Thread Nick H
You're right. I was assuming that the problem was that we get different behaviors in different browsers. If your goal is to have identical results on all platforms, use sortWith and specify a comparison function that never returns EQ. But if your goal is to preserve the original order when elemen

Re: [elm-discuss] List.sortBy browser dependance?

2016-07-13 Thread Janis Voigtländer
Isn’t List.sortWith using exactly the same unstable JS sorting function under the hood? ​ 2016-07-13 17:22 GMT+02:00 Nick H : > For a workaround, all you need to do is use List.sortWith instead. > > sortBy uses JavaScript's native array sorting function under the hood. The > JS function is docume

Re: [elm-discuss] List.sortBy browser dependance?

2016-07-13 Thread Nick H
For a workaround, all you need to do is use List.sortWith instead. sortBy uses JavaScript's native array sorting function under the hood. The JS function is documented as being unstable (order not preserv

[elm-discuss] List.sortBy browser dependance?

2016-07-13 Thread Mark Green
It appears that the functionality of List.sortBy is semi-browser dependent when the sorting function is a partial ordering. My current version of Firefox sorts according to the partial order, and within ties, maintains the order from the original list. However, user reports have been that some oth