equality - pannous/warp GitHub Wiki
equality
Two variables or data node_pointer are equal if the types are compatible, and if for every field, the values in both records are equal. The equality comparison descends into children with other children, but value focussed: a:{x: {y=3.0}}and b:{x:{y=3}} are equal, because the root name is considered the variable name and the fields x=3.0 (float) and x=3 (int) are compatible.
Types and functions
== between types is exact, is is the subtype test: type(2) == type(3) and type(0) is number are true,
type(0) == number is false. A value never equals a type: 3 == int is false, with a hint toward is. Nor
is a type a text: type(x) == "int" is false, with a hint toward the type word type(x) == int.
Function values are equal when their written definitions (parameter names aside) and captured values are:
make(n) := (x => x + n)
make(1) == make(1) // yes
make(1) == make(2) // no