Peoples more advance than me could probably modify Julia to make it create all the functions:
deepmap!(f,A::Type1) = f(A)
deepmap!(f,A::Type2) = f(A)
....
for all Type TypeN
for witch the function f
is define and thus make sure to always be types stable while making it easy to program as well (you don’t need to define them by yourself).