Sort using a custom comparator: Difference between revisions

m
(Added Fōrmulæ solution)
Line 2,479:
 
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
We define a new function to give true or false if two elements are in order.
After that we can simply use the built-in Sort with an ordering function:
1,111

edits