Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
enum Barcode { case upc(Int, Int, Int, Int) case qr(String) } func describe(_ code: Barcode) { switch code { case .upc(let a, let b, let c, let d): print("UPC: \(a)-\(b)-\(c)-\(d)") case .qr(let text): print("QR: \(text)") } } describe(.upc(8, 85909, 51226, 3)) describe(.qr("HELLO"))