Please interrupt me anytime if you have questions
Developed by Ericsson
Been around for over 20 years
Built with concurrency and distributed systems in mind
Battle tested not only in telecom systems
defmodule HelloWorld do
def hello do
IO.puts "Hello, World!"
end
end
HelloWorld.hello() # "Hello, World!"# without pattern matching
def foobar(foo) do
if foo == "foo" do
"Foo"
else
"Bar"
end
end
# with pattern matching
def foobar("foo"), do: "Foo"
def foobar(_foo), do: "Bar"
foo = add1(1) # 2
foo = add1(foo) # 3
foo = add1(foo) # 4
1
|> add1() # 2
|> add1() # 3
|> add1() # 4