Format

A ~= B

Returns

1 if A and B are equivalent; 0 otherwise

Equivalence is a looser version of equality:

  • Two lists are equivalent if their contents are the same. (This is a shallow comparison, so it doesn’t check if the Nth items are also equivalent, only equal.)
  • Two matrix values are equivalent if their components are the same.
  • Datums A and B are equivalent if A overloads the ~= operator with a proc that returns true for B. Without an overload, they are only equivalent if they’re the same object.

To check if A and B are equal, use the == operator.

Note

For code compiled in version 516 or later, **BROKEN LINK: /list/assoc** in lists are also checked for equality. This was not the case for older versions.

See also