feat: lambda is mutable
This commit is contained in:
@@ -18,7 +18,7 @@ func ReduceOnce(e lambda.Expression) (lambda.Expression, bool) {
|
||||
|
||||
case lambda.Application:
|
||||
if fn, fnOk := e.Abstraction.(lambda.Abstraction); fnOk {
|
||||
return fn.Body.Substitute(fn.Parameter, e.Argument), true
|
||||
return lambda.Substitute(fn.Body, fn.Parameter, e.Argument), true
|
||||
}
|
||||
|
||||
abs, reduced := ReduceOnce(e.Abstraction)
|
||||
|
||||
Reference in New Issue
Block a user