Index: src/libcfa/containers/maybe
===================================================================
--- src/libcfa/containers/maybe	(revision 79b5869e2bd89e2defed0b6c4eb9dd2b9ec60cc5)
+++ src/libcfa/containers/maybe	(revision 79b5869e2bd89e2defed0b6c4eb9dd2b9ec60cc5)
@@ -0,0 +1,56 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// maybe -- May contain a value.
+//
+// Author           : Andrew Beach
+// Created On       : Wed May 25 14:43:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Apr 25 16:58:00 2017
+// Update Count     : 1
+//
+
+
+#ifndef MAYBE_H
+#define MAYBE_H
+
+
+// DO NOT USE DIRECTLY!
+forall(otype T)
+struct maybe {
+    _Bool has_value;
+    T value;
+};
+
+
+forall(otype T)
+void ?{}(maybe(T) * this);
+
+forall(otype T)
+void ?{}(maybe(T) * this, T value);
+
+forall(otype T)
+void ?{}(maybe(T) * this, maybe(T) other);
+
+forall(otype T)
+void ^?{}(maybe(T) * this);
+
+forall(otype T)
+_Bool ?!=?(result(T, E) this, zero_t);
+
+forall(otype T)
+maybe(T) maybe_value(T value);
+
+forall(otype T)
+maybe(T) maybe_none();
+
+forall(otype T)
+_Bool has_value(maybe(T) * this);
+
+forall(otype T)
+T get(maybe(T) * this);
+
+#endif // MAYBE_H
Index: src/libcfa/containers/maybe.c
===================================================================
--- src/libcfa/containers/maybe.c	(revision 79b5869e2bd89e2defed0b6c4eb9dd2b9ec60cc5)
+++ src/libcfa/containers/maybe.c	(revision 79b5869e2bd89e2defed0b6c4eb9dd2b9ec60cc5)
@@ -0,0 +1,70 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// maybe.c -- May contain a value.
+//
+// Author           : Andrew Beach
+// Created On       : Wed May 25 15:40:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed May 25 17:00:00 2017
+// Update Count     : 1
+//
+
+#include <containers/maybe>
+#include <assert>
+
+
+forall(otype T)
+void ?{}(maybe(T) * this) {
+	this->has_value = false;
+}
+
+forall(otype T)
+void ?{}(maybe(T) * this, T value) {
+	this->has_value = true;
+	this->value = value;
+}
+
+forall(otype T)
+void ?{}(maybe(T) * this, maybe(T) other) {
+	this->has_value = other.has_value;
+	if (other.has_value) {
+		this->value = other.value;
+	}
+}
+
+forall(otype T)
+void ^?{}(maybe(T) * this) {
+	if (this->has_value) {
+		^(this->value){};
+	}
+}
+
+forall(otype T)
+_Bool ?!=?(result(T, E) this, zero_t) {
+	return !this->has_value;
+}
+
+forall(otype T)
+maybe(T) maybe_value(T value) {
+	return (Maybe(T)){value};
+}
+
+forall(otype T)
+maybe(T) maybe_none() {
+	return (Maybe(T)){};
+}
+
+forall(otype T)
+_Bool has_value(maybe(T) * this) {
+	return this->has_value;
+}
+
+forall(otype T)
+T get(maybe(T) * this) {
+	assertf(this->has_value, "attempt to get from maybe without value");
+	return this->value;
+}
Index: src/libcfa/containers/result
===================================================================
--- src/libcfa/containers/result	(revision 79b5869e2bd89e2defed0b6c4eb9dd2b9ec60cc5)
+++ src/libcfa/containers/result	(revision 79b5869e2bd89e2defed0b6c4eb9dd2b9ec60cc5)
@@ -0,0 +1,65 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// result -- Contains the expected value or an error value.
+//
+// Author           : Andrew Beach
+// Created On       : Wed May 25 14:45:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed May 25 16:57:00 2017
+// Update Count     : 1
+//
+
+
+#ifndef RESULT_H
+#define RESULT_H
+
+
+// DO NOT USE DIRECTLY!
+forall(otype T, otype E)
+struct result {
+	_Bool has_value;
+	union {
+		T value;
+		E error;
+	};
+};
+
+
+forall(otype T, otype E)
+void ?{}(result(T, E) * this);
+
+forall(otype T, otype E)
+void ?{}(result(T, E) * this, one_t, T value);
+
+forall(otype T, otype E)
+void ?{}(result(T, E) * this, zero_t, E error);
+
+forall(otype T, otype E)
+void ?{}(result(T, E) * this, result(T, E) other);
+
+forall(otype T, otype E)
+void ^?{}(result(T, E) * this);
+
+forall(otype T, otype E)
+_Bool ?!=?(result(T, E) this, zero_t);
+
+forall(otype T, otype E)
+result(T, E) result_value(T value);
+
+forall(otype T, otype E)
+result(T, E) result_error(E error);
+
+forall(otype T, otype E)
+_Bool has_value(result(T, E) * this);
+
+forall(otype T, otype E)
+T get(result(T, E) * this);
+
+forall(otype T, otype E)
+E get_error(result(T, E) * this);
+
+#endif // RESULT_H
Index: src/libcfa/containers/result.c
===================================================================
--- src/libcfa/containers/result.c	(revision 79b5869e2bd89e2defed0b6c4eb9dd2b9ec60cc5)
+++ src/libcfa/containers/result.c	(revision 79b5869e2bd89e2defed0b6c4eb9dd2b9ec60cc5)
@@ -0,0 +1,87 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// result.c -- Contains the expected value or an error value.
+//
+// Author           : Andrew Beach
+// Created On       : Wed May 25 15:40:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed May 25 17:02:00 2017
+// Update Count     : 1
+//
+
+#include <containers/result>
+#include <assert>
+
+
+forall(otype T, otype E)
+void ?{}(result(T, E) * this) {
+	this->has_value = false;
+	(this->error){};
+}
+
+forall(otype T, otype E)
+void ?{}(result(T, E) * this, one_t, T value) {
+	this->has_value = true;
+	this->value = value;
+}
+
+forall(otype T, otype E)
+void ?{}(result(T, E) * this, zero_t, E error) {
+	this->has_value = false;
+	this->error = error;
+}
+
+forall(otype T, otype E)
+void ?{}(result(T, E) * this, result(T, E) other) {
+	this->has_value = other.has_value;
+	if (other.has_value) {
+		this->value = other.value;
+	} else {
+		this->error = other.error;
+	}
+}
+
+forall(otype T, otype E)
+void ^?{}(result(T, E) * this) {
+	if (this->has_value) {
+		^(this->value){};
+	} else {
+		^(this->error){};
+	}
+}
+
+forall(otype T, otype E)
+_Bool ?!=?(result(T, E) this, zero_t) {
+	return !this->has_value;
+}
+
+forall(otype T, otype E)
+result(T, E) result_value(T value) {
+	return (Result(T, E)){1, value};
+}
+
+forall(otype T, otype E)
+result(T, E) result_error(E error) {
+	return (Result(T, E)){0, value};
+}
+
+forall(otype T, otype E)
+_Bool has_value(result(T, E) * this) {
+	return this->has_value;
+}
+
+forall(otype T, otype E)
+T get(result(T, E) * this) {
+    assertf(this->has_value, "attempt to get from result without value");
+	return this->value;
+}
+
+forall(otype T, otype E)
+E get_error(result(T, E) * this) {
+    assertf(this->has_value, "attempt to get from result without error");
+	return this->error;
+}
