Created
May 21, 2018 18:58
-
-
Save dineshba/d53a7c9877728df2598ccf417ac4bbe1 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
struct Cherry: Eatable { | |
var taste: Taste = Taste.sweet | |
func isBitter() -> Bool { | |
return self.taste == .bitter | |
} | |
} | |
let 🍒 = Cherry() // literally we can have variable name like this🤓 | |
struct Chilly: Eatable { | |
var taste: Taste = Taste.spicy | |
func isBitter() -> Bool { | |
return self.taste == .bitter | |
} | |
} | |
let 🌶 = Chilly() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment