fix: optimization that was being ignored

This commit is contained in:
Kasey White 2023-04-05 15:57:31 -04:00 committed by Kasey
parent 6c932bb562
commit a1b3ae52d8
1 changed files with 1 additions and 1 deletions

View File

@ -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);
} }