 	public func analysis<T>(
 		ifKind: (() -> T)? = nil,
 		ifType: (() -> T)? = nil,
-		ifVariable: (Int -> T)? = nil,
+		ifVariable: ((Int, Recur) -> T)? = nil,
 		ifApplication: ((Recur, Recur) -> T)? = nil,
 		ifAbstraction: ((Int, Recur, Recur) -> T)? = nil,
 		otherwise: () -> T) -> T {

			ifAbstraction: { i, t, b in
				let (mt, buildt) = lambdaHelper(t)
				let (mb, buildb) = lambdaHelper(b)
				return (i, { self.abstraction(i == -1 ? $0 : i, buildt($0), buildb($0)) })
			})
	}


	public var freeVariables: Set<Int> {
		return expression.analysis(
			ifVariable: { [ $0 ] },
			ifApplication: { $0.freeVariables.union($1.freeVariables) },
			ifAbstraction: { $2.freeVariables.subtract([ $0 ]).union($1.freeVariables) },
			otherwise: const([]))

			return ifKind()
		case .Type:
			return ifType()
		case let .Variable(x, type):
			return ifVariable(x, type.value)
		case let .Application(a, b):
			return ifApplication(a.value, b.value)
		case let .Abstraction(x, a, b):
