You can't edit a function like that. If you add a new function definitoin for
foo(x::Baz)
then you will never enter the method that has those if else statements. This is the benefit of multiple dispatch. You can't add more if else statements inside a method that is already written but you can add new methods.