Re: Sort on linkedlists with double values (inside main list)

"M.v.Gulik" <[email protected]>
Newsgroups gmane.comp.lang.groovy.user
Message-ID <CAOSpiuE9-vLZks5Y6vZo-r+Yz8yauaHvOxRv_4FELaUoOG5PDA@mail.gmail.com>
I'm after information so I might better understand why "**.sort{[ -it.x,
-it.y]}*" (*vs "*.sort{[ it.x, it.y]}"*) has no effect on Double and Float
values in this particular case (*both sorts return identical ordered list*.
Not so when using Integer or BigDecimal values).

Mainly working with Python (*but I have no choice to use Groovy in this
case, which is kinda alien to me*). As such I prefer "**.sort{[it.x, it.y]}*"
over "**.sort{ a, b -> a.x == b.x ? a.y <=> b.y : a.x <=> b.x }*" ... + The
latter might, for all I know at this moment, exhibit the same behavior when
it comes to Double or Float values.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.