3 ms·
Not a function but when a module has a struct that you want to use inside the module you need to use the full module name or alias itself.
by conradfr 3y ago
Not a function but when a module has a struct that you want to use inside the module you need to use the full module name or alias itself.
- arrowsmith 3y agoYou can write __MODULE__ to reference the current module. Or if the current module is a struct you can write %__MODULE__{}
- conradfr 3y agoThat's not very pretty though ;) IIRC you can also write: alias __MODULE__