Elm Exactly

Derived formif-chain

Stated in ADerived Forms, under Expressions exp\expm.

Derived Form\textnormal{Derived Form}Equivalent Form\textnormal{Equivalent Form}
if exp1 then exp1′else if exp2 then exp2′ ⋯else if expn then expn′else exp\begin{array}{l} \kw{if}\ \expm_1\ \kw{then}\ \expm'_1\\ \kw{else}\ \kw{if}\ \expm_2\ \kw{then}\ \expm'_2\ \cdots\\ \kw{else}\ \kw{if}\ \expm_n\ \kw{then}\ \expm'_n\\ \kw{else}\ \expm \end{array}if exp1 then exp1′ else (  if exp2 then exp2′ else ( ⋯    if expn then expn′ else exp )⋯)(n≥2)\begin{array}{l} \kw{if}\ \expm_1\ \kw{then}\ \expm'_1\ \kw{else}\ \kw{(}\\ \;\kw{if}\ \expm_2\ \kw{then}\ \expm'_2\ \kw{else}\ \kw{(}\ \cdots\\ \;\;\kw{if}\ \expm_n\ \kw{then}\ \expm'_n\ \kw{else}\ \expm \ \kw{)}\cdots\kw{)}\\ \qquad (n\geq 2) \end{array}
Read it in its chapter·Permanent address: /standard/derived-forms/if-chain

Tests (0)

No test of the suite checks this derived form yet.

Discussions

Discuss this derived form·Search the discussions on GitHub

Discussions are on GitHub; one about this derived form has [df:if-chain] 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.