This idea is best backed by a Behaviour (as is any scenario where you are making function calls to modules dynamically).
I’d say it’s one of a few GoF patterns that have a direct analog in pattern-matching functional languages. Most of them can either be elegantly handled with or made redundant by, pattern matching and/or functional programming.


















