lambda-calc-1/value/lazy/new.c
2025-01-13 20:36:07 -06:00

34 lines
594 B
C

#include <debug.h>
#include <environment/inc.h>
#include <expression/inc.h>
#include "../new.h"
#include "inheritance.h"
#include "struct.h"
#include "new.h"
struct value* new_lazy_value(
struct environment* environment,
struct expression* expression)
{
ENTER;
struct lazy_value* this = (void*) new_value(
vk_lazy,
&lazy_value_inheritance,
sizeof(*this));
this->environment = inc_environment(environment);
this->expression = inc_expression(expression);
this->value = NULL;
EXIT;
return (void*) this;
}