You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Note: All modules defined in Elixir are defined inside a main Elixir namespace. However, for convenience, you can omit "Elixir." when referencing them.
32
32
33
-
Aliases are frequently used to define shortcuts. In fact, calling `alias` without an `as` option sets the alias automatically to the last part of the module name, for example:
33
+
Aliases are frequently used to define shortcuts. In fact, calling `alias` without an `:as` option sets the alias automatically to the last part of the module name, for example:
34
34
35
35
```elixir
36
36
aliasMath.List
@@ -89,7 +89,7 @@ iex> duplicate :ok, 3
89
89
[:ok, :ok, :ok]
90
90
```
91
91
92
-
In this case, we are importing only the function `duplicate` (with arity 2) from `List`. Although `only:` is optional, its usage is recommended. `except` could also be given as an option.
92
+
In this case, we are importing only the function `duplicate` (with arity 2) from `List`. Although `:only` is optional, its usage is recommended. `:except` could also be given as an option.
93
93
94
94
`import` also supports `:macros` and `:functions` to be given to `:only`. For example, to import all macros, one could write:
0 commit comments