November 2017
Intermediate to advanced
670 pages
17h 35m
English
The following are the Setoid rules:
|
Name of rule |
Description |
|
Reflexivity |
a.equals(a) === true |
|
Symmetry |
a.equals(b) === b.equals(a) |
|
Transitivity |
if a.equals(b) and b.equals(c), then a.equals(c) |
|
If b is not the same Ord, behavior of lte is unspecified (returning false is recommended). lte must return a Boolean (true or false). |
The values used in the rules are a, b, and c. A value which has an Ord must provide an lte method. The equals method is this algebra's operator and it takes one argument.
That's it. That's all there is to it!