Julia will route calls to the method with the most specific types. LJ and WS will dispatch to the specific methods I defined earlier. I did not define a specific method for MorsePotential
so that selects the method with AbstractPotential
.
You can learn more from the following video on multiple dispatch.