Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
conradfr
on March 27, 2024
|
parent
|
context
|
favorite
| on:
Why Elixir (2014)
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
on March 28, 2024
[–]
You can write __MODULE__ to reference the current module. Or if the current module is a struct you can write %__MODULE__{}
conradfr
on March 28, 2024
|
parent
[–]
That's not very pretty though ;)
IIRC you can also write:
alias __MODULE__
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: