#include #include #include #include #include #include #include #include #include "struct.h" #include "new.h" struct booleans* new_booleans(void) { ENTER; struct booleans* this = smalloc(sizeof(*this)); struct string* x = new_string(L"x", 1); struct string* y = new_string(L"y", 1); { struct expression* body = new_variable_expression(x); struct expression* lambda_y = new_lambda_expression(y, body); struct value* lambda_xy = new_lambda_value(NULL, x, lambda_y); this->true_value = lambda_xy; free_expression(lambda_y); free_expression(body); } { struct expression* body = new_variable_expression(y); struct expression* lambda_y = new_lambda_expression(y, body); struct value* lambda_xy = new_lambda_value(NULL, x, lambda_y); this->false_value = lambda_xy; free_expression(lambda_y); free_expression(body); } free_string(x); free_string(y); EXIT; return this; }