Scoping fun in Julia

Background Julia is a high-level programming language that is exceptionally well suited for scientific and mathematical applications. If you are not familiar with it, you should give it a try! Last year, Julia 1.0 was finally released. Among other important changes, it introduced a different set of scoping rules. For the unwary, these can lead to quite unexpected behavior, and in some cases subtle but embarassing errors (I am speaking out of personal experience here!