compare
lib.trivial.compare
Docs pulled from | This Revision | about 1 hour ago
C-style comparisons
a < b, compare a b => -1 a == b, compare a b => 0 a > b, compare a b => 1
Inputs
a
-
1. Function argument
b
-
2. Function argument
Noogle detected
Implementation
The following is the current implementation of this function.
compare = a: b:
if a < b
then -1
else if a > b
then 1
else 0;