/main.go Secret
Last active
June 18, 2020 13:23
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
// package decls, imports... | |
// Hooman & Pet interfaces... | |
// Person & Dog structs... | |
func PlayAround(type H Hooman, P Pet)(human H, pet P) { | |
fmt.Println("The human says:", human.Speak()) | |
fmt.Println("And the pet responds:", pet.ProduceSound()) | |
} | |
func main() { | |
PlayAround(Person{}, Dog{}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment