Closed bre7 closed 6 years ago
extension ReflectionDecodable where Self: CaseIterable { public static func reflectDecoded() throws -> (Self, Self) { guard !allCases.isEmpty, allCases.count > 1 else { throw ReflectionError() } guard let first = allCases.first, let last = allCases.last else { throw ReflectionError() } return (first, last) } }
4.2 PR ?
Yes, please!
4.2 PR ?