lambda-calculus/environment/variable/new.c
2025-01-13 20:36:07 -06:00

29 lines
405 B
C

#include <debug.h>
#include <memory/smalloc.h>
#include <string/inc.h>
#include <value/inc.h>
#include "struct.h"
#include "new.h"
struct variable* new_variable(
struct string* name,
struct value* value)
{
ENTER;
struct variable* this = smalloc(sizeof(*this));
this->name = inc_string(name);
this->value = inc_value(value);
EXIT;
return this;
}