Figuredynamic-basis-eq
If , then .
If and are floats: if neither is NaN and (so that equals ), and otherwise.
If and are both Int values, both characters, both strings, both the unit value, both process identifiers, or both boundary values (Chapter 8) that are , , , numbers, strings or byte sequences: if and are the same, and otherwise.
If and have the same form, with components and (), as listed below, then if for every , and if for some . The forms are:
tuples with the same number of components;
constructor values and with the same constructor name and ;
records and with , the components being and for each ;
arrays of boundary values (JSON arrays among them) with the same number of elements, and objects of boundary values with the same set of keys, the components being the values at each key;
effect values (Chapter 8) of the same form, with the same primitives, managers and port names, the components being the values, boundary values, tasks, commands and subscriptions they contain.
Otherwise .
Referred to from
Tests (1)
- elm / ArrayEqualityFlagsTestTwo arrays are equal under `==` when they hold equal elements in the same order: arrays received as flags are compared, with the same elements, a different element, and a different length.
Discussions
Discuss this figure·Search the discussions on GitHub
Discussions are on GitHub; one about this figure has [fig:dynamic-basis-eq] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.