String) -> T? { if let value = values[member] { return value as? T } } } let container = Container(values: ["name": "Pikachu"]) let name: String = container.name // Pikachu
public func fetch<T: Extractable>(for key: String) throws -> T { if let argument = arguments[key] { if let value = T.extract(from: argument) { return value } } throw Error.parsingArgumentFailed } public subscript<T: Extractable>(dynamicMember member: String) -> T? { return try? fetch(for: member) } }