Is this what you are looking for?
julia> battle(x::warrior, y::warrior) = x.strength > y.strength ? x : y
battle (generic function with 1 method)
julia> battle(Legolas, snakeeyes)
ninja(12, "stealth")
Is this what you are looking for?
julia> battle(x::warrior, y::warrior) = x.strength > y.strength ? x : y
battle (generic function with 1 method)
julia> battle(Legolas, snakeeyes)
ninja(12, "stealth")