 			otherwise: const([]))
 	}
 
-	public func typecheck(_ environment: [Int: Value] = [:]) -> Either<Error, Value> {
+	public func typecheck(_ environment: Environment = [:]) -> Either<Error, Value> {
 		return expression.analysis(
 			ifType: const(Either.right(.Type)),
 			ifBound: { i -> Either<Error, Value> in



	// MARK: Type-checking

	public var freeVariables: Set<Int> {
		return expression.analysis(


	// MARK: Evaluation

	public func evaluate(_ environment: Environment = [:]) -> Either<Error, Value> {
		return expression.analysis(
			ifType: const(Either.right(.Type)),
			ifBound: { i -> Either<Error, Value> in
