 	}
 
 
-	public static func failure(error: NSError) -> Result {
-		return .Failure(error)
+	public func get() throws -> T {
+		switch self {
+		case let .Failure(error): throw error
+		case let .Success(value): return value
+		}
 	}
 
 

		}
	}
}



// Workaround for Swift limitation which does not support dynamically sized enum<T>.

public final class ResultValue<T> {

	private let value: T


	private init(_ value: T) {
		self.value = value
	}
}


extension ResultValue: CustomDebugStringConvertible {

	public var debugDescription: String {
		return description
	}
}


extension ResultValue: CustomStringConvertible {

	public var description: String {
		return String(value)
	}
}



public enum Result<T> {
	case Failure(ErrorType)
	case Success(T)


	public var error: ErrorType? {
		switch self {
		case let .Failure(error): return error
		case .Success:            return nil
