Elm Exactly

Basis entryBasics.lt

A value of Basics. Its type is in Section C.3 Basics.

Static basis

op stands for ↦ OTSTAT(op)<, > lt, gt ↦ (∀comparable. comparable→comparable→Bool,v)\begin{array}{|clcl|}\hline \opv {\ }& \text{stands for} {\ }& \mapsto {\ }& \OTstat(\opv)\\\hline \kw{<},\ \kw{>} {\ }& \href{/standard/basis/Basics/lt}{\kw{lt}},\ \href{/standard/basis/Basics/gt}{\kw{gt}} {\ }& \mapsto {\ }& (\forall\mv{comparable}.\,\mv{comparable} \rightarrow \mv{comparable} \rightarrow \tBool, \isv)\\\hline\end{array}
Figure 40: The Static Operator Table, OTSTAT\OTstat

Dynamic basis

opstands for ↦ OTDYN(op)arity<, >, <=, >=lt, gt, le, ge ↦ basic value2\begin{array}{|clclc|}\hline \opv {\quad}& \text{stands for} {\ }& \mapsto {\ }& \OTdyn(\opv) {\qquad}& \arity\\\hline \kw{<},\ \kw{>},\ \kw{<=},\ \kw{>=} {\quad}& \href{/standard/basis/Basics/lt}{\kw{lt}},\ \href{/standard/basis/Basics/gt}{\kw{gt}},\ \href{/standard/basis/Basics/le}{\kw{le}},\ \href{/standard/basis/Basics/ge}{\kw{ge}} {\ }& \mapsto {\ }& \text{basic value} {\qquad}& 2\\\hline\end{array}
Figure 46: The Dynamic Operator Table, OTDYN\OTdyn

Its APPLY

APPLY(lt,x,y) = {True}if neither is NaN and x<y = {False}otherwise\begin{array}{rcll} \APPLY(\kw{lt},x,y) {\ }& = {\ }& \{\kw{True}\} {\quad}& \text{if neither is NaN and}\ x<y\\ {\ }& = {\ }& \{\kw{False}\} {\quad}& \text{otherwise}\end{array}
APPLY(lt,v,v′) = {True}if cmp(v,v′)=LT = {False}otherwise\begin{array}{rcll} \APPLY(\kw{lt},v,v') {\ }& = {\ }& \{\kw{True}\} {\quad}& \text{if}\ \dbcmp(v,v')=\kw{LT}\\ {\ }& = {\ }& \{\kw{False}\} {\quad}& \text{otherwise}\end{array}
Read it in its chapter·Permanent address: /standard/basis/Basics/lt

Tests (10)

  • elm / InfixPrecCompareOverAndTest
    `<` (precedence 4) binds more tightly than `&&` (precedence 3).
  • elm-core / ContainerCompareCharTest
    Ordering of pairs, triples and lists of `Char` with `compare` and the relational operators.
  • elm-core / ContainerCompareIntTest
    Ordering of pairs, triples and lists of `Int` with `compare` and the relational operators.
  • elm-core / FloatCompareTest
    `<`, `>`, `<=`, `>=`, `==` and `/=` on `Float` literals, each in a case where the comparison is `True`.
  • elm-core / FloatMathFloatLessThanTest
    `<` on two Float literals, `1.5 < 2.5`, is True.
  • elm-core / IntCompareTest
    Checks that the six comparison operators `<`, `>`, `<=`, `>=`, `==` and `/=` give `True` on Int literals.
  • elm-core / OrderingEmptyListTest
    Tests that `<`, `<=`, `>` and `>=` on `List Int` order the empty list before any non-empty list and treat two empty lists as equal.
  • elm-core / OrderingEmptyStringTest
    Tests that `<`, `<=`, `>` and `>=` on `String` order `""` before any non-empty string and treat two empty strings as equal.
  • elm-core / OrderingTupleWithEmptyListTest
    Tests `<`, `<=`, `>` and `>=` on `( Int, List Int )` tuples whose first components are equal, so the result is decided by comparing `[]` with `[ 1 ]` in the second component.
  • elm-core / OrderingTupleWithEmptyStringTest
    Tests `<`, `<=`, `>` and `>=` on `( Int, String )` tuples whose first components are equal, so the result is decided by comparing `""` with `"a"` in the second component.

Discussions

Discuss this basis entry·Search the discussions on GitHub

Discussions are on GitHub; one about this basis entry has [b:Basics.lt] 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.