I remember I read about adding brackets after the function call but I just forgot to add them :D however, I don't like removing the ampersand, i think it helps distinguish the difference between user defined functions and built-in function...
I will actually do that, even though I don't know a lot about the <=> :D but using -1, 0, and 1 makes more sense than using 0, 1, and 2...
It's just that considering it's just a loop, i think it should run faster than this!