Name | Expression | Precondition | Semantics | Postcondition |
---|---|---|---|---|
Function call | f(x, y) | The ordered pair | Returns | The result is either |
Irreflexivity | |
Antisymmetry | |
Transitivity | |
Transitivity of equivalence | Equivalence (as defined above) is transitive: if |
• less<int>
• less<double>
• greater<int>
• greater<double>
[1] The first three axioms, irreflexivity, antisymmetry, and transitivity, are the definition of a
LessThan Comparable,
MonoidOperation
Category: functors
Component type: concept
A Monoid Operation is a special sort of Binary Function. A Binary Function must satisfy three conditions in order to be a Monoid Operation. First, its first argument type and second argument type must be the same, and its result type must be the same as its argument type. Second, there must be an identity element. Third, the operation must be associative. Examples of Monoid Operations are addition and multiplication. [1]
Binary Function
Argument type | The type of the Monoid Operation's first argument and second argument, and also the type returned when the Monoid Operation is returned. |
F
A type that is a model of MonoidOperation
T
f
Object of type
x, y, z
Objects of type
A type
In addition to the expressions described in the Binary Function requirements, the following expressions must be valid.
Name | Expression | Return type |
---|---|---|
Function call | f(x, y) |