-
-
Save Pasanpr/5e7b352d0d45ea57abeb6c8b2f770b23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Snack { | |
case gum | |
case cookie | |
} | |
struct Item { | |
let price: Int | |
let quantity: Int | |
} | |
let inventory: [Snack: Item] = [ | |
.gum: Item(price: 1, quantity: 5), | |
.cookie: Item(price: 2, quantity: 3) | |
] | |
let someItem = Item(price: 2, quantity: 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment