Elixir Data Type Comparison
Elixir has an interesting defined sorting order for its data types. The order is as follows:
number < atom < reference < function < port < pid < tuple < map < list < bitstring
For example:
random_data = [["Hello World"], {:hello, :world}, 16, %{key: "value"}, :atom]
Enum.sort(random_data)
#=> [16, :atom, {:hello, :world}, %{key: "value"}, ["Hello World"]]
Or even
4 < :atom
#=> true
Tweet