ExpressionsΒΆ

An expression is some combination of values, operators, and functions which describes a value (turning an expression into a value is called evaluation).

Examples of expressions in Disco include:

Examples of things which are not expressions include:

  • x : N (this is a type signature, not an expression; it does not have a value, it says what the type of x is)
  • x = 3 (this is a definition)

Warning

Be careful not to confuse x = 3 (a definition of the variable x) with x == 3 (a comparison expression which has a value of either true or false depending on whether x is equal to 3 or not). See Definition versus equality testing.