Having a function getting a function as parameter:
mutating func updateAccessCaches(by areInIncreasingOrder: (NumberedFile, NumberedFile) -> Bool = sortByOldIDPrio) { ... }
How do I compare like
if areInIncreasingOrder == sortByOldIDPrio { ... }
I get the error
Binary operator '==' cannot be applied to operands of type '(DSRenamer.NumberedFile, DSRenamer.NumberedFile) -> Swift.Bool' and '(DSRenamer.NumberedFile, DSRenamer.NumberedFile) -> Swift.Bool'
Using other help from the internet, I was told that you can only compare if the function is the same, if you call both and if the result is the same, it is the same function? But that's obviously wrong.
So how can I decide if the reference of the functions are the same. Should be simple like in C, isn't it?