Elm Exactly

Basis entryBasics.apL

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

Static basis

op stands for ↦ OTSTAT(op)<| apL ↦ (∀a b. (a→b)→a→b,v)\begin{array}{|clcl|}\hline \opv {\ }& \text{stands for} {\ }& \mapsto {\ }& \OTstat(\opv)\\\hline \kw{<|} {\ }& \href{/standard/basis/Basics/apL}{\kw{apL}} {\ }& \mapsto {\ }& (\forall\mv{a}\,\mv{b}.\,(\mv{a} \rightarrow \mv{b}) \rightarrow \mv{a} \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

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

Tests (2)

  • elm / InfixAssocPipesTest
    `|>` associates to the left and `<|` to the right.
  • 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.apL] 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.