Skip to content

Instantly share code, notes, and snippets.

import LinearAlgebra.det
@apow2
apow2 / demo.jl
Last active January 10, 2021 19:54
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"