Empty List Is Sorted?

Empty List Is Sorted?
$\begingroup$

Is an empty list considered to be sorted?

Let's say I have a math function sort that sorts a list of numbers.

sort :: (Eq a) => [a] -> [a]

The above function definition (written in Haskell) means that the function's input is a list of any type 'a', and then its output is a list of that same input type.

(Eq a) means that we can must be able to compare the list's elements.

Example: a could be a number since numbers can be compared for equality.

From a math point of view, is an empty List considered to be sorted?

$\endgroup$
8
Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.