Elm Exactly

Derived forminfix

Stated in ADerived Forms, under Expressions exp\expm.

Derived Form\textnormal{Derived Form}Equivalent Form\textnormal{Equivalent Form}
exp1 op exp2\expm_1\ \opv\ \expm_2(op) (exp1) (exp2)\kw{(}\opv\kw{)}\ \kw{(}\expm_1\kw{)}\ \kw{(}\expm_2\kw{)}
Read it in its chapter·Permanent address: /standard/derived-forms/infix

Tests (23)

  • elm / InfixAssocLeftArithTest
    `-`, `/` and `//` associate to the left.
  • elm / InfixAssocPipesTest
    `|>` associates to the left and `<|` to the right.
  • elm / InfixAssocRightConsAppendTest
    `::` and `++` (both precedence 5) associate to the right, so `"a" ++ "b" :: [ "c" ]` does not type.
  • elm / InfixAssocRightPowTest
    `^` associates to the right.
  • elm / InfixIfExtendsRightTest
    An `if` extends as far right as it can: its `else` branch takes in a chain after it.
  • elm / InfixLastOperandAnyExprTest
    The last operand of a chain may be any expression: an `if` or a lambda.
  • elm / InfixNegatedOperandTest
    A negation symbol in an operator chain negates the atomic expression after it, and no more.
  • elm / InfixNonAssocSeparatedLegalTest
    Two non-associative operators of equal precedence may share a chain when an operator of lower precedence stands between them.
  • elm / InfixPrecAddOverConsTest
    `+` (precedence 6) binds more tightly than `::` (precedence 5).
  • elm / InfixPrecAppendOverEqTest
    `++` (precedence 5) binds more tightly than `==` (precedence 4).
  • elm / InfixPrecApplicationFirstTest
    Application binds more tightly than any operator.
  • elm / InfixPrecCompareOverAndTest
    `<` (precedence 4) binds more tightly than `&&` (precedence 3).
  • elm / InfixPrecComposeOverPipeTest
    `<<` (precedence 9) binds more tightly than `|>` (precedence 0).
  • elm / InfixPrecMulOverAddTest
    `*` (precedence 7) binds more tightly than `+` (precedence 6).
  • elm / InfixPrecOrOverPipeTest
    `||` (precedence 2) binds more tightly than `|>` (precedence 0).
  • elm / InfixPrecPowOverMulTest
    `^` (precedence 8) binds more tightly than `*` (precedence 7).
  • elm-core / CompositionTest
    Function composition with `>>` and `<<`, and the pipe operator `|>`.
  • elm-core / EqualityBoolIfTest
    The result of `==` and `/=` on `Bool` operands drives an `if` expression correctly.
  • elm-core / FloatNegativeZeroTest
    Negative zero (`-0.0`) equals 0.0, and dividing 1.0 by it gives -Infinity while dividing by 0.0 gives Infinity.
  • elm-core / FloatSubTest
    Float subtraction gives the expected value, including when the right operand is a negative literal.
  • elm-core / IntSubTest
    Checks integer subtraction `-`, including subtracting a negative literal.
  • elm-core / NotEqualBoolIfTest
    The result of `/=` on two `Bool` literals is used as the condition of an `if`, for all four combinations of operands; each logs `"yes"` exactly when the operands differ.
  • 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 derived form·Search the discussions on GitHub

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