Reference
Comparison
Equality
| Input | Two equatable arguments (numbers, strings, booleans, timestamps, durations, lists, maps, sets, vectors, stacks, or queues). |
|---|---|
| Output | True if they are equal. False otherwise. |
Signature
comp_eq(a: Equatable, b: Equatable): BooleanExample
comp_eq(5, 5) // returns trueInequality
| Input | Two equatable arguments (numbers, strings, booleans, timestamps, durations, lists, maps, sets, vectors, stacks, or queues). |
|---|---|
| Output | True if they are not equal. False otherwise. |
Signature
comp_neq(a: Equatable, b: Equatable): BooleanExample
comp_neq(5, 3) // returns trueGreater than
| Input | Two numbers, two strings, two timestamps, or two durations. |
|---|---|
| Output | True if the first argument is greater than the second one. False otherwise. |
Signature
comp_gt(a: Ordered, b: Ordered): BooleanExample
comp_gt(5, 3) // returns trueLess than
| Input | Two numbers, two strings, two timestamps, or two durations. |
|---|---|
| Output | True if the first argument is less than the second one. False otherwise. |
Signature
comp_lt(a: Ordered, b: Ordered): BooleanExample
comp_lt(3, 5) // returns trueGreater than or equal
| Input | Two numbers, two strings, two timestamps, or two durations. |
|---|---|
| Output | True if the first argument is greater than or equal to the second one. False otherwise. |
Signature
comp_ge(a: Ordered, b: Ordered): BooleanExample
comp_ge(5, 5) // returns trueLess than or equal
| Input | Two numbers, two strings, two timestamps, or two durations. |
|---|---|
| Output | True if the first argument is less than or equal to the second one. False otherwise. |
Signature
comp_le(a: Ordered, b: Ordered): BooleanExample
comp_le(3, 5) // returns true