Skip to content

Instantly share code, notes, and snippets.

@geykel
Created January 28, 2016 03:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geykel/0c20954211fec1ff2855 to your computer and use it in GitHub Desktop.
Save geykel/0c20954211fec1ff2855 to your computer and use it in GitHub Desktop.
// 1
protocol Hablar {
func decirHola(nombre: String)
}
// 2
class Persona: Hablar {
// 3
func decirHola(nombre: String) {
// 4
print("Hola (nombre).")
}
}
// 5
var juliana = Persona()
var geykel = Persona()
// 6
juliana.decirHola("Geykel")
geykel.decirHola("Juliana")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment