Module lambda_calculus::reduction [] [src]

β-reduction for lambda Terms

Reexports

pub use self::Order::*;

Enums

Order

The evaluation order of β-reductions. The default is NOR (normal order).

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.

beta

Performs β-reduction on a Term with the specified evaluation Order, an optional limit on number of reductions (0 means no limit) and optional display of reduction steps; it returns the Term after reductions.

compare

Prints the number of reductions required for a Term to reach the final form with the given reduction strategies and optionally displaying the applicable reduction steps.