Elm Exactly

Basis entryBasics.apR

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

Static basis

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

Dynamic basis

opstands for ↦ OTDYN(op)arity|>, <|apR, apL ↦ Elm\begin{array}{|clclc|}\hline \opv {\quad}& \text{stands for} {\ }& \mapsto {\ }& \OTdyn(\opv) {\qquad}& \arity\\\hline \kw{|>},\ \kw{<|} {\quad}& \href{/standard/basis/Basics/apR}{\kw{apR}},\ \href{/standard/basis/Basics/apL}{\kw{apL}} {\ }& \mapsto {\ }& \text{Elm} {\qquad}& \\\hline\end{array}
Figure 46: The Dynamic Operator Table, OTDYN\OTdyn

Its text in Elm

apR x f =
  f x
Figure 48: The Values of Basics Written in Elm
Read it in its chapter·Permanent address: /standard/basis/Basics/apR

Tests (6)

  • elm / InfixAssocPipesTest
    `|>` associates to the left and `<|` to the right.
  • elm / InfixPrecComposeOverPipeTest
    `<<` (precedence 9) binds more tightly than `|>` (precedence 0).
  • elm / InfixPrecOrOverPipeTest
    `||` (precedence 2) binds more tightly than `|>` (precedence 0).
  • elm / StandardCoreEvaluationExamplesTest
    Small programs for rules of the dynamic semantics of the Core that other tests reach only in passing, and examples from the Comments of A Standard Definition of Elm?, Chapter 6.
  • elm-core / CompositionTest
    Function composition with `>>` and `<<`, and the pipe operator `|>`.
  • elm-core / PipelineTest
    Tests the pipeline operators `|>` and `<|`: a chain of forward pipes, a forward pipe into a partially applied local `map`, written with patterns, and a chain of backward pipes.

Discussions

Discuss this basis entry·Search the discussions on GitHub

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