 
 	public var description: String {
 		return "[\n" + join("", lazy(bindings).map { "\t\(toString($0)): \(toString($1)),\n" }) + "]"
+	}
+
+
+	// MARK: SequenceType
+
+	public func generate() -> IndexingGenerator<Environment> {
+		return IndexingGenerator(self)
 	}
 }
 

//  Copyright (c) 2015 Rob Rix. All rights reserved.

public struct Environment: DictionaryLiteralConvertible, Printable {
	private var bindings: Dictionary<Symbol, Value>

	public subscript (key: String) -> (Symbol, Value)? {

	public subscript (key: Symbol) -> Value? {
		get { return bindings[key] }
		set { bindings[key] = newValue }
	}


	// MARK: CollectionType

	public var startIndex: Dictionary<Symbol, Value>.Index {
		return bindings.startIndex
	}

	public var endIndex: Dictionary<Symbol, Value>.Index {
		return bindings.startIndex
	}

	public subscript (index: Dictionary<Symbol, Value>.Index) -> (Symbol, Value) {
		return bindings[index]
	}


