View Source Moar.Integer (Moar v1.63.0)
Integer-related functions.
Summary
Functions
Compares two integers, returning :lt
, :eq
, or :gt
.
Functions
Compares two integers, returning :lt
, :eq
, or :gt
.
iex> Moar.Integer.compare(1, 3)
:lt
iex> Moar.Integer.compare(1, -3)
:gt
iex> Moar.Integer.compare(-1, -1)
:eq
iex> Enum.sort([5, 6, 0, -1], Moar.Integer)
[-1, 0, 5, 6]