Open kevinbarabash opened 6 months ago
https://developer.apple.com/documentation/swift/initialization-with-literals
struct OrderedSet<Element: Hashable>: Collection, SetAlgebra { // implementation details } extension OrderedSet: ExpressibleByArrayLiteral { init(arrayLiteral: Element...) { self.init() for element in arrayLiteral { self.append(element) } } } var foo: OrderedSet<Int> = [1, 2, 3]
This can be used with all literal types. It does mean that the code generator
https://developer.apple.com/documentation/swift/initialization-with-literals
This can be used with all literal types. It does mean that the code generator