Comparison¶
Comparing values, as functions and as operators. = and equal? compare loosely: "abc" = "ABC" is true and
so is 1 = 1.0. == and strict-equal? compare the case and the datatype too, and same? asks whether two
values are one and the same.
A decimal is equal to another number at most 10 representable decimals away from it, so 0.1 + 0.2 = 0.3. An
integer beyond 2^53, which no decimal holds exactly, is compared exactly, as < and > compare it:
9007199254740993 = 9007199254740992.0 is false.
A date without time is that day at midnight, and two dates in different zones are equal when they are the same
moment: 1-Jan-2020 = 1-Jan-2020/0:00 and 1-Jan-2020/0:00 = 1-Jan-2020/1:00+1:00. A tuple counts the parts it
lacks as 0, so 1.2.3 = 1.2.3.0. Two blocks are equal when their values are, pair by pair, but there two values of
different datatypes are equal only when both are numbers or both are words: [1] = [1.0] and [a] = [a:], yet
"ab" = <ab> while ["ab"] <> [<ab>].
equal?¶
True if the values are equal.
equal? a b
a(any-type!)b(any-type!)
not-equal?¶
True if the values are not equal.
not-equal? a b
a(any-type!)b(any-type!)
strict-equal?¶
True if the values are equal and of the same type and case.
strict-equal? a b
a(any-type!)b(any-type!)
strict-not-equal?¶
True if the values are not strictly equal.
strict-not-equal? a b
a(any-type!)b(any-type!)
same?¶
True if the values are the very same: the same series at the same position, the same object.
same? a b
a(any-type!)b(any-type!)
lesser?¶
True if the first value is less than the second.
lesser? a b
a(any-value!)b(any-value!)
greater?¶
True if the first value is more than the second.
greater? a b
a(any-value!)b(any-value!)
lesser-or-equal?¶
True if the first value is less than or equal to the second.
lesser-or-equal? a b
a(any-value!)b(any-value!)
greater-or-equal?¶
True if the first value is more than or equal to the second.
greater-or-equal? a b
a(any-value!)b(any-value!)
=¶
True if the values are equal.
An operator, written between its values: a = b is equal? a b (see equal?).
a = b
a(any-type!)b(any-type!)
<>¶
True if the values are not equal.
An operator, written between its values: a <> b is not-equal? a b (see not-equal?).
a <> b
a(any-type!)b(any-type!)
==¶
True if the values are equal and of the same type and case.
An operator, written between its values: a == b is strict-equal? a b (see strict-equal?).
a == b
a(any-type!)b(any-type!)
!==¶
True if the values are not strictly equal.
An operator, written between its values: a !== b is strict-not-equal? a b (see strict-not-equal?).
a !== b
a(any-type!)b(any-type!)
<¶
True if the first value is less than the second.
An operator, written between its values: a < b is lesser? a b (see lesser?).
a < b
a(any-value!)b(any-value!)
>¶
True if the first value is more than the second.
An operator, written between its values: a > b is greater? a b (see greater?).
a > b
a(any-value!)b(any-value!)
<=¶
True if the first value is less than or equal to the second.
An operator, written between its values: a <= b is lesser-or-equal? a b (see lesser-or-equal?).
a <= b
a(any-value!)b(any-value!)
>=¶
True if the first value is more than or equal to the second.
An operator, written between its values: a >= b is greater-or-equal? a b (see greater-or-equal?).
a >= b
a(any-value!)b(any-value!)