Elm Exactly

Basis entryBasics.composeR

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

Static basis

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

Dynamic basis

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

Its text in Elm

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

Tests (1)

  • elm-core / CompositionTest
    Function composition with `>>` and `<<`, and the pipe operator `|>`.

Discussions

Discuss this basis entry·Search the discussions on GitHub

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