There’s a common pattern in Elixir libraries where an “implementation module” is used by generic functions provided by the library, and the library provides a
use macro that takes care of filling in the correct parameter automatically.
Ecto.Repouses this technique to pass the name of the module it’s
used in to functions in
- Guardian uses this technique both for it’s core functions as well as for a plug; it’s where I got the term “implementation module” from:
Is there a name for this pattern? “Specialization”? “Compile-time currying”?