+struct EnvironmentNode;
+typedef struct EnvironmentNode EnvironmentNode;
+struct EnvironmentNode
+{
+ Symbol* key;
+ Object value;
+ EnvironmentNode* next;
+};
+
+struct Environment;
+typedef struct Environment Environment;
+struct Environment
+{
+ EnvironmentNode* root;
+};
+
+Environment* Environment_construct()
+{
+ // TODO Handle malloc returning NULL
+ Environment* result = malloc(sizeof(Environment));
+ result->root = NULL;
+ return result;
+}
+
+void Environment_destruct(Environment* self)
+{
+ EnvironmentNode* next;
+ for(EnvironmentNode* node = self->root; node != NULL; node = next)
+ {
+ // We don't need to destruct the keys, because those will be destructed at the end when the Runtime is destructed
+ // We don't need to destruct the permanent strings, because those will be destructed at the end when the Runtime is destructed
+ // The above two comments represent all heap-allocated objects currently, so we don't need to destruct Objects (yet)
+ next = node->next;
+ free(node);
+ }
+}
+
+// This need not be thread safe because environments exist on one thread only
+void Environment_set(Environment* self, Symbol* key, Object value)
+{
+ EnvironmentNode* node = malloc(sizeof(EnvironmentNode));
+ node->key = key;
+ node->value = value;
+ node->next = self->root;
+ self->root = node;
+}
+
+Object Environment_get(Environment* self, Symbol* symbol)
+{
+ for(EnvironmentNode* node = self->root; node != NULL; node = node->next)
+ {
+ // We can compare pointers because pointers are unique within Runtime->symbols
+ if(node->key == symbol)
+ {
+ return node->value;
+ }
+ }
+
+ // TODO Handle symbol errors
+ assert(false);
+}
+
+
+// TODO Allocate all symbols and strings as static constants so we can remove the level of indirection