By: Marco Cognetta
Re-posted from: https://mcognetta.github.io/posts/dispatch-unionall-julia/index.html
A post about efficiently dispatching on types that are in the same UnionAll, but are possibly different concrete types (for example, A{T} and A{S}) in Julia.