Function lamcal::reduce_inspected [−][src]
pub fn reduce_inspected<B, I>(expr: &Term, inspect: &mut I) -> Term where
B: BetaReduce,
I: Inspect,
Performs a [β-reduction] on a given lambda expression with inspection applying the given reduction strategy and inspection.
The reduction strategy to be used must be given as the type parameter B
.
The given inspection is called before each contraction (reduction step).
See the documentation of the inspect
for how to
define an inspection and the provided implementations.
This function returns the result as a new Term
. The given Term
remains
unchanged. If you want to apply a β-reduction modifying the term in place
use the associated function
Term::reduce_inspected
instead.