Module lambda_calculus::reduction [] [src]

β-reduction for lambda Terms

Enums

Order

The evaluation order of β-reductions. The default is Normal.

Constants

SHOW_REDUCTIONS

Set to true to see all the steps of β-reductions. The default is false.

Functions

apply

Applies two Terms with substitution and variable update, consuming the first one in the process. It produces an Error if the first Term is not an Abstraction.

benchmark

Prints the number of reductions required for term to reach the final form with all the available reduction strategies, optionally excluding the ones from the given list. Such exclusions might be necessary, especially if the expression contains the fixed-point combinator.

beta

Performs β-reduction on a Term with the specified evaluation Order and an optional limit on number of reductions (0 means no limit).