Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Programming functions

Define functions, hold and release evaluation, branch on a condition and update a variable in place.

43 functions

Described functions

  • add_to

    Add a value to a variable in place and return the new value.

  • construct

    Apply a head that is itself computed to arguments, as in f'(0) or (x => body)(a).

  • decrement

    Subtract 1 from a variable in place and return its old value.

  • divide_by

    Divide a variable by a value in place and return the new value.

  • evaluate

    Evaluate an expression even where it would be held.

  • function

    A function with no name; also written x => body.

  • ifelse

    A value chosen by a test.

  • increment

    Add 1 to a variable in place and return its old value.

  • indicator

    A condition as a number: 1 when it is true and 0 when it is false.

  • piecewise

    Cases written value if condition, with an optional otherwise case.

  • pre_decrement

    Subtract 1 from a variable in place and return the new value.

  • pre_increment

    Add 1 to a variable in place and return the new value.

  • release_hold

    Evaluate an expression that was held.

  • set

    Assign a value to a name; also written name := value.

  • set_delayed

    Define a function; also written f(x) := body.

  • slot

    The n-th argument of a function with no name: inside function(body), slot(1) is the first.

  • subs_repeated

    Apply substitution rules again and again until nothing changes.

  • subtract_from

    Subtract a value from a variable in place and return the new value.

  • times_by

    Multiply a variable by a value in place and return the new value.

  • with_effort

    Evaluate a body at quick, standard, deep or exhaustive effort.

More functions in this category

Nobody has described these yet: each is listed with its first form.

Other categories

Last updated