feat: reducer works

This commit is contained in:
2025-12-25 00:40:34 -05:00
parent d5999e8e1c
commit 88ee4f799e
4 changed files with 23 additions and 15 deletions

View File

@@ -30,9 +30,9 @@ func main() {
cli.HandleError(err)
logger.Info("Parsed syntax tree.", "tree", lambda.Stringify(expression))
lambda.Normalize(&expression)
cli.HandleError(err)
logger.Info("Evaluated expression.", "tree", expression)
for lambda.ReduceOnce(&expression) {
logger.Info("Reduction.", "tree", lambda.Stringify(expression))
}
fmt.Println(lambda.Stringify(expression))
}