First commit
This commit is contained in:
commit
1dba0af064
36 changed files with 1065 additions and 0 deletions
21
aliases.ex
Normal file
21
aliases.ex
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
defmodule Some.Nested do
|
||||
def print_from_nested do
|
||||
IO.puts("Somehting from nested")
|
||||
end
|
||||
end
|
||||
|
||||
defmodule MyModule do
|
||||
import IO
|
||||
alias IO, as: MyIO
|
||||
alias Some.Nested
|
||||
|
||||
def print do
|
||||
puts("Something")
|
||||
end
|
||||
|
||||
def print_from_alias do
|
||||
MyIO.puts("Something from alias")
|
||||
end
|
||||
|
||||
def print_from_nested, do: Nested.print_from_nested()
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue