Equatable Interface
🚧 Status: The
Equatable
interface is not implemented yet.
An equatable type is a type that can be compared for equality. Types are equatable when they implement the Equatable
interface.
Equatable types can be compared for equality using the equals operator (==
) or inequality using the unequals operator (!=
).
Most of the built-in types are equatable, like booleans and integers. Arrays are equatable when their elements are equatable. Dictionaries are equatable when their values are equatable.
To make a type equatable the Equatable
interface must be implemented, which requires the implementation of the function equals
, which accepts another value that the given value should be compared for equality.
Last updated