remove smart allocations, back to bruteforce
[lambda.git] / lambda.y
index 3aff9c1..9cde7e1 100644 (file)
--- a/lambda.y
+++ b/lambda.y
@@ -31,9 +31,7 @@ int yywrap()
 
 struct lambda *make_lambda()
 {
-       struct lambda *t = malloc(sizeof (struct lambda));
-       t->refcount = 1;
-       return t;
+       return malloc(sizeof (struct lambda));
 }
 
 struct lambda *make_ident(char *i)
@@ -148,7 +146,7 @@ lambda
                        struct lambda *t = $1;
                        printf("     ");
                        for(unsigned int i = 0; i<999; i++)
-                               if(!lambda_reduce(&t, &t, false))
+                               if(!lambda_reduce(&t, &t, true))
                                        break;
                        lambda_print(t, NULL);
                        putchar('\n');