Skip to content

Instantly share code, notes, and snippets.

Last active Jul 12, 2017
What would you like to do?
class Cat : Eye{
var isIdle: Bool? = true
func closeEyesAndSleep() {
if isIdle == true{
print("Cat is sleeping now")
print("Cat will NOT sleep now")
func openEyesAndLookAround() {
print("Cat is looking around")
extension Cat : Animal{
func run() {
isIdle = true
print("Cat is running now")
func stop() {
isIdle = false
print("Cat has stopped now")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment