diff --git a/.vscode/launch.json b/.vscode/launch.json
index b438376..c265161 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -9,7 +9,7 @@
             "type": "cppdbg",
             "request": "launch",
             "program": "${workspaceFolder}/src/lisp/lisp",
-            "args": ["test-macros.lisp"],
+            "args": ["test-closures.lisp"],
             "stopAtEntry": false,
             "cwd": "${workspaceFolder}/src/lisp",
             "environment": [],
diff --git a/src/lisp/call_list.s b/src/lisp/call_list.s
index da0c00c..72d6277 100644
--- a/src/lisp/call_list.s
+++ b/src/lisp/call_list.s
@@ -7,12 +7,16 @@
 	;;; This function should call it's first argument with the arguments from
 	;;; the cons-list passed as its second argument.
 
-	;;; _call_list(function pointer, cons list)
+	;;; _call_list(function pointer, cons list, edi)
 _call_list:
+	;; esi and edi are callee-saved on x86, these are the only registers 
+	;; we clobber.
+	push esi
+	push edi
 	push ebp
 	mov ebp, esp
 
-	mov edi, [ebp + 12]						; Cons list
+	mov edi, [ebp + 20]						; Cons list
 	
 	push edi
 	call length								; Length of cons list in eax
@@ -49,9 +53,12 @@
 	jmp .loop
 
 .done:
-	mov ebx, [ebp + 8]						; Function pointer
+	mov ebx, [ebp + 16]						; Function pointer
+	mov edi, [ebp + 24]						; Closure data pointer
 	call ebx
 
 	mov esp, ebp
 	pop ebp
+	pop edi
+	pop esi
 	ret
diff --git a/src/lisp/compiler.dasc b/src/lisp/compiler.dasc
index 8c876d3..8d96a52 100644
--- a/src/lisp/compiler.dasc
+++ b/src/lisp/compiler.dasc
@@ -3,6 +3,7 @@
 #include "compiler.h"
 #include "lib/std.h"
 #include "plat/plat.h"
+#include "gc.h"
 
 #include <dasm_proto.h>
 #include <dasm_x86.h>
@@ -32,8 +33,6 @@
 dasm_State *d;
 unsigned int npc = 8;
 
-extern void _do_gc(unsigned int ebp, unsigned int esp);
-
 |.macro run_gc;
 | mov eax, esp;
 | push ebp;
@@ -88,8 +87,8 @@
 }
 
 struct dasm_State *compile_function(value_t args, enum namespace namespace,
-                                    struct environment *env,
-									struct local *local_out, int *nargs)
+                                    struct environment *env, struct local *local_out,
+                                    struct local *local_parent, int *nargs)
 {
 	dasm_State *d;
 	dasm_State **Dst = &d;
@@ -114,20 +113,17 @@
 	memset(local.stack_slots, 0, sizeof(bool) * 4);
 	local.num_stack_slots = 4;
 	local.num_stack_entries = 0;
+	local.num_closure_slots = 0;
+	local.parent = local_parent;
 
 	dasm_growpc(&d, local.npc);
 
 	// Generate code
 	// TODO: first pass, extract bound and free variables
 
-	value_t name = car(args);
-	args = cdr(args);
 	value_t arglist = car(args);
 	value_t body = cdr(args);
 
-	if ((name & HEAP_MASK) != SYMBOL_TAG)
-		err("function name must be a symbol");
-
 	value_t a = arglist;
 	for (int i = 0; !nilp(a); a = cdr(a), i++)
 	{
@@ -163,6 +159,9 @@
 		*nargs = length(arglist);
 
 	return d;
+
+	// TODO: local leaks memory! free variables too, not just stack slots (in
+	// two places). Add a free_local() function that does this.
 }
 
 void compile_tl(value_t val, struct environment *env)
@@ -173,8 +172,6 @@
 	value_t form = car(val);
 	value_t args = cdr(val);
 
-	printf("Compiling function %s in %s\n", (char *)(car(args) ^ SYMBOL_TAG), (char *)(form ^ SYMBOL_TAG));
-
 	if (symstreq(form, "defun") || symstreq(form, "defmacro"))
 	{
 		enum namespace namespace = NS_FUNCTION;
@@ -182,10 +179,9 @@
 		if (symstreq(form, "defmacro"))
 			namespace = NS_MACRO;
 
-
 		struct local local;
 		int nargs;
-		dasm_State *d = compile_function(args, namespace, env, &local, &nargs);
+		dasm_State *d = compile_function(cdr(args), namespace, env, &local, NULL, &nargs);
 
 		add_function(env, (char *)(car(args) ^ SYMBOL_TAG), link(&d),
 		             nargs, namespace);
@@ -209,7 +205,7 @@
 		value_t expr = cdr(args);
 		for (; !nilp(expr); expr = cdr(expr))
 		{
-			walk_and_alloc(local, expr);
+			walk_and_alloc(local, car(expr));
 		}
 
 		local_free(local, slot);
@@ -241,7 +237,6 @@
 
 	while (read1(is, &val))
 	{
-		printval(val, 0);
 		compile_tl(val, &env);
 	}
 
@@ -278,6 +273,25 @@
 	}
 }
 
+void compile_variable(struct variable *v, dasm_State *Dst)
+{
+	switch (v->type)
+	{
+	case V_ARGUMENT:
+		| mov eax, dword [ebp + (value_size * (v->number + 2))];
+		break;
+	case V_BOUND:
+		| mov eax, dword [ebp - ((v->number + 1) * value_size)];
+		break;
+	case V_FREE:
+		// edi is the closure context pointer
+		| mov eax, dword [edi + (v->number * value_size)];
+		break;
+	default:
+		err("Sorry, can only access V_ARGUMENT, V_FREE and V_BOUND variables for now :(");
+	}
+}
+
 void compile_expression(struct environment *env, struct local *local,
                         value_t val, dasm_State **Dst)
 {
@@ -401,6 +415,55 @@
 
 			| pop eax;
 		}
+		else if (symstreq(fsym, "lambda"))
+		{
+			// Compile the function with this as the parent scope
+			struct local new_local;
+			int nargs_out;
+			dasm_State *d = compile_function(args, NS_ANONYMOUS, env, &new_local, local, &nargs_out);
+
+			// Link the function
+			void *func_ptr = link(&d);
+
+			// Create a closure object with the correct number of captures at
+			// runtime
+			| mov ebx, (create_closure);
+			| push (new_local.num_closure_slots);
+			| push (nargs_out);
+			| push (func_ptr);
+			| call ebx;
+			| add esp, 12;
+
+			// Walk the generated local scope for V_FREE variables, since each
+			// of these exists in our scope (or higher), evaluate it and set it
+			// as a member of the lambda capture.
+
+			for (struct variable *var = new_local.first; var; var = var->prev)
+			{
+				if (var->type == V_FREE)
+				{
+					// Closure in eax
+					| push eax;
+					// Variable now in eax
+					compile_variable(find_variable(local, var->name), Dst);
+					| push eax;
+
+					| mov ebx, (set_closure_capture_variable);
+					// The capture offset
+					| push (var->number);
+					| call ebx;
+					// Skip the value and index
+					| add esp, 8;
+					// Pop the closure back in to eax
+					| pop eax;
+				}
+			}
+
+			// Closure is still in eax
+
+			dasm_free(&d);
+			free(new_local.stack_slots);
+		}
 		else
 		{
 			struct function *func =
@@ -432,16 +495,12 @@
 			{
 				value_t expanded_to = call_list(func, args);
 
-				printf("Macro expanded to:\n");
-				printval(expanded_to, 2);
-
 				compile_expression(env, local, expanded_to, Dst);
 			}
 		}
 	}
 	else if (symbolp(val))
 	{
-		// For now ignore global variables, only search locally
 		struct variable *v = find_variable(local, (char *)(val ^ SYMBOL_TAG));
 
 		if (!v)
@@ -450,17 +509,7 @@
 			err("Variable unbound");
 		}
 
-		switch (v->type)
-		{
-		case V_ARGUMENT:
-			| mov eax, dword [ebp + (value_size * (v->number + 2))];
-			break;
-		case V_BOUND:
-			| mov eax, dword [ebp - ((v->number + 1) * value_size)];
-			break;
-		default:
-			err("Sorry, can only access V_ARGUMENT and V_BOUND variables for now :(");
-		}
+		compile_variable(v, Dst);
 	}
 }
 
@@ -508,12 +557,30 @@
 	for (; v && strcmp(v->name, name) != 0; v = v->prev)
 	{}
 
+	if (!v)
+	{
+		if (local->parent)
+		{
+			v = find_variable(local->parent, name);
+
+			if (v)
+			{
+				// We found this in a parent scope, add it as a V_FREE variable to skip the search.
+				v = add_variable(local, V_FREE, name, local->num_closure_slots++);
+			}
+		}
+	}
 	return v;
 }
 
-extern value_t _call_list(void *addr, value_t list);
+extern value_t _call_list(void *addr, value_t list, value_t *edi);
 
 value_t call_list(struct function *func, value_t list)
 {
-	return _call_list(func->code_ptr, list);
+	return _call_list(func->code_ptr, list, NULL);
+}
+
+value_t call_list_closure(struct closure *c, value_t list)
+{
+	return _call_list(c->function, list, c->data);
 }
diff --git a/src/lisp/compiler.h b/src/lisp/compiler.h
index 0b61c14..07928d2 100644
--- a/src/lisp/compiler.h
+++ b/src/lisp/compiler.h
@@ -7,8 +7,12 @@
 
 enum namespace
 {
+	/// A function
 	NS_FUNCTION,
+	/// A macro
 	NS_MACRO,
+	/// An anonymous function (a lambda/closure)
+	NS_ANONYMOUS,
 };
 
 struct function
@@ -63,13 +67,39 @@
 	int npc;
 	int nextpc;
 	bool *stack_slots;
-	int num_stack_slots, num_stack_entries;
+	/// Number of slots allocated in `stack_slots`
+	int num_stack_slots;
+	/// Number of entries used in `stack_slots`
+	int num_stack_entries;
+	/// Number of closure slots total (allocated as V_FREE variables)
+	int num_closure_slots;
 };
 
 void compile_expression(struct environment *env, struct local *local,
                         value_t val, dasm_State **Dst);
 
 /**
+ * Compile a function
+ * @param args The function args and body, e.g. `((b c) d)`
+ * @param namespace The function namespace.
+ * @param env The environment.
+ * @param local_out The local environment generated for this function will be
+ * returned here. NULL if you do not care about it being returned (you probably
+ * should since you need to free the stack slot allocation map).
+ * @param local_parent Parent local environment, only needed for closures. NULL
+ * if no parent.
+ * @param nargs The number of arguments for this function will be returned here.
+ * NULL if you don't care about it.
+ * @returns The compiled function state. You should probably give this to
+ * `add_function` or something similar.
+ */
+struct dasm_State *compile_function(value_t args, enum namespace namespace,
+                                    struct environment *env, struct local *local_out,
+                                    struct local *local_parent, int *nargs);
+
+void compile_variable(struct variable *v, dasm_State *Dst);
+
+/**
  * Compile a backquoted expression
  */
 void compile_backquote(struct environment *env, struct local *local,
@@ -94,11 +124,17 @@
 struct function *find_function(struct environment *env, char *name);
 struct variable *add_variable(struct local *local, enum var_type type,
                               char *name, int number);
-// Might return null
+
+/**
+ * Find a variable in `local` with name `name`.
+ * @returns The variable, NULL if not found.
+ */
 struct variable *find_variable(struct local *local, char *name);
+
 void destroy_local(struct local *local);
 
 /**
  * Like `apply` in lisp, calls func with list args and returns the result.
  */
 value_t call_list(struct function *func, value_t list);
+value_t call_list_closure(struct closure *c, value_t list);
diff --git a/src/lisp/gc.c b/src/lisp/gc.c
index 16ec471..8820ef5 100644
--- a/src/lisp/gc.c
+++ b/src/lisp/gc.c
@@ -39,6 +39,16 @@
 				_mark(cons->cons.cdr, marked);
 				break;
 			}
+			case CLOSURE_TAG: {
+				struct closure_alloc *closure = (void *)alloc;
+
+				for (int i = 0; i < closure->closure.num_captured; i++)
+				{
+					_mark(closure->closure.data[i], marked);
+				}
+
+				break;
+			}
 			}
 		}
 	}
diff --git a/src/lisp/lib/std.c b/src/lisp/lib/std.c
index 485bf49..028dd3d 100644
--- a/src/lisp/lib/std.c
+++ b/src/lisp/lib/std.c
@@ -39,6 +39,17 @@
 	return nil;
 }
 
+value_t l_apply(value_t func, value_t args)
+{
+	if (!closurep(func))
+		return nil;
+
+	if (!listp(args))
+		return nil;
+
+	return call_list_closure((struct closure *)(func ^ CLOSURE_TAG), args);
+}
+
 void add_function(struct environment *env, char *name, void *func, int nargs, enum namespace ns)
 {
 	struct function *last, *new = malloc(sizeof(struct function));
@@ -65,4 +76,6 @@
 	add_function(env, "cons", cons, 2, NS_FUNCTION);
 
 	add_function(env, "print", l_printval, 1, NS_FUNCTION);
+
+	add_function(env, "apply", l_apply, 2, NS_FUNCTION);
 }
diff --git a/src/lisp/lib/std.h b/src/lisp/lib/std.h
index 5162bab..9070de8 100644
--- a/src/lisp/lib/std.h
+++ b/src/lisp/lib/std.h
@@ -4,6 +4,7 @@
 #include "../lisp.h"
 
 value_t l_plus(value_t a, value_t b);
+value_t l_printval(value_t val);
 
 void add_function(struct environment *env, char *name, void *func, int nargs, enum namespace ns);
 void load_std(struct environment *env);
diff --git a/src/lisp/lisp.c b/src/lisp/lisp.c
index 1056db7..b619033 100644
--- a/src/lisp/lisp.c
+++ b/src/lisp/lisp.c
@@ -73,7 +73,8 @@
 	if (is->peek(is) == ';')
 	{
 		while (is->get(is) != '\n')
-		{}
+		{
+		}
 
 		// Only time I ever use labels is for stuff like this. Compiler would
 		// probably optimize this if I used recursion but I don't want to
@@ -234,6 +235,12 @@
 	{
 		printf("nil\n");
 	}
+	else if (closurep(v))
+	{
+		struct closure *c = (void *)(v ^ CLOSURE_TAG);
+		printf("closure %p taking %d argument(s) and capturing %d value(s)\n",
+		       c->function, c->num_args, c->num_captured);
+	}
 	else
 	{
 		printf("<unknown %d>\n", v);
@@ -452,7 +459,12 @@
 
 bool heapp(value_t v)
 {
-	return consp(v) || stringp(v) || symbolp(v);
+	return consp(v) || stringp(v) || symbolp(v) || closurep(v);
+}
+
+bool closurep(value_t v)
+{
+	return (v & HEAP_MASK) == CLOSURE_TAG;
 }
 
 bool listp(value_t v)
@@ -575,3 +587,27 @@
 
 	return c->name;
 }
+
+value_t create_closure(void *code, int nargs, int ncaptures)
+{
+	struct closure_alloc *ca = malloc_aligned(sizeof(struct closure_alloc) +
+	                                          ncaptures * sizeof(value_t));
+
+	ca->closure.function = code;
+	ca->closure.num_args = nargs;
+	ca->closure.num_captured = ncaptures;
+
+	add_this_alloc(&ca->alloc, CLOSURE_TAG);
+
+	return (value_t)(&ca->closure) | CLOSURE_TAG;
+}
+
+void set_closure_capture_variable(int index, value_t value, value_t closure)
+{
+	if (!closurep(closure))
+		return;
+
+	struct closure *c = (void *)(closure ^ CLOSURE_TAG);
+
+	c->data[index] = value;
+}
diff --git a/src/lisp/lisp.h b/src/lisp/lisp.h
index 675cc96..7c0e571 100644
--- a/src/lisp/lisp.h
+++ b/src/lisp/lisp.h
@@ -41,7 +41,11 @@
 
 struct closure
 {
+	/// How many arguments does this closure take
 	int num_args;
+	/// How many free variables does it capture (i.e. length of `data`)
+	int num_captured;
+	/// The function pointer itself
 	void *function;
 
 	/// This will be passed in edi.
@@ -153,6 +157,7 @@
 bool listp(value_t v);
 bool nilp(value_t v);
 bool heapp(value_t v);
+bool closurep(value_t v);
 int length(value_t v);
 value_t elt(value_t v, int index);
 
@@ -162,5 +167,13 @@
 
 bool symstreq(value_t sym, char *str);
 
+value_t create_closure(void *code, int nargs, int ncaptures);
+
+/**
+ * Set the `index`th capture variable of `closure`. This should really only be
+ * called when creating a new closure.
+ */
+void set_closure_capture_variable(int index, value_t value, value_t closure);
+
 extern value_t nil;
 extern value_t t;
diff --git a/src/lisp/test-closures.lisp b/src/lisp/test-closures.lisp
new file mode 100644
index 0000000..1311a98
--- /dev/null
+++ b/src/lisp/test-closures.lisp
@@ -0,0 +1,5 @@
+(defun main ()
+  (let1 (number 3)
+    (let1 (adds-3 (lambda (n)
+                    (+ n number)))
+      (print (apply adds-3 '(4))))))
