Last active
April 6, 2020 21:15
-
-
Save ezequieloliveiralima/674933199a2df12986e46e8d9e29bcab 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 Cachorro { | |
var nome: String | |
var raca: String | |
func latir() { | |
print("\(nome) latiu!") | |
} | |
} | |
struct Pessoa { | |
var nome: String | |
var cachorros: [Cachorro] | |
mutating func tem(maisUm cachorro: Cachorro) { | |
cachorros.append(cachorro) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment