From 6282a1811ba60fbc186a81037f95f8b5d9f4c8cc Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 16 May 2018 20:11:00 +0200 Subject: [PATCH] reduction optimization --- reduce.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/reduce.c b/reduce.c index 9dbf678..83ab536 100644 --- a/reduce.c +++ b/reduce.c @@ -45,7 +45,6 @@ void lambda_reduce(struct lambda *t, struct lambda *total, int *maxdepth) //If the first argument is an abstraction, we apply t1 = t->data.application.expr1; t2 = t->data.application.expr2; - lambda_reduce(t1, total, maxdepth); if(t1->which == lambda_abs){ subst(t1->data.abstraction.ident, t1->data.abstraction.expr, t2, total); (*maxdepth)--; @@ -55,8 +54,6 @@ void lambda_reduce(struct lambda *t, struct lambda *total, int *maxdepth) printf("-> "); lambda_print(total); lambda_reduce(t, total, maxdepth); - } else { - lambda_reduce(t2, total, maxdepth); } break; } -- 2.20.1