fix: optimization that was being ignored
This commit is contained in:
parent
6c932bb562
commit
a1b3ae52d8
|
@ -222,7 +222,7 @@ fn lambda_reduce(term: &mut Term<Name>) {
|
||||||
body,
|
body,
|
||||||
} = func
|
} = func
|
||||||
{
|
{
|
||||||
if let replace_term @ (Term::Var(_) | Term::Constant(_)) = argument.as_ref() {
|
if let replace_term @ (Term::Var(_) | Term::Constant(_)) = arg{
|
||||||
let body = Rc::make_mut(body);
|
let body = Rc::make_mut(body);
|
||||||
*term = substitute_term(body, parameter_name.clone(), replace_term);
|
*term = substitute_term(body, parameter_name.clone(), replace_term);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue