On Mon, 20 May 2024 at 17:02, Paul King <pa...@asert.com.au> wrote:

> This might even be more obvious:
>
> println ([[x:1, y:100],  [x:2, y:1], [x: 2, y:500]].sort{[it.x,
> it.y]}) // broken: [[x:2, y:1], [x:1, y:100], [x:2, y:500]]
> println ([[x:1, y:100],  [x:2, y:1], [x: 2, y:500]].sort{ a, b -> a.x
> == b.x ? a.y <=> b.y : a.x <=> b.x }) // works
>

 Aha. Thanks.
Definitely needed to see it 'not' working in one of the other value types.
+(*spotte a bug in my source code that gave me the wrong result on my
"*.sort{ a, b ->...}" test. ... it picked the wrong sort-case*. :-/ )

Reply via email to