Is there a way to represent infinity in Erlang / Elixir?

There is a simple hack for you.
:infinity is greater than any number here. Because check the order of comparison in elixir number < atom < reference < function < port < pid < tuple < map < list < bitstring

Atom in Elixir is greater than any Number

Here :point_right: Infinity in Elixir/Erlang?

7 Likes