Last active
January 10, 2021 19:54
-
-
Save apow2/a289d95970e39f53055e1651959fbcba to your computer and use it in GitHub Desktop.
This file contains hidden or 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
abstract type Person end | |
abstract type Tourist <:Person end | |
abstract type Deer end | |
encounter(a::Deer, b::Tourist) = "bows politely" | |
encounter(a::Tourist, b::Deer) = "feeds" | |
encounter(a::Person, b::Deer) = "beckons" | |
encounter(a::Deer, b::Person) = "ignores" | |
encounter(a::Tourist, b::Deer, foo::String) = "feeds deer $foo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment