protocol Enum { static func associatedValue(_ value: String) -> Self static var singleValue: Self { get } } enum Foo: Enum { case associatedValue(String) case singleValue }