philip giuliani, daniel morandini, andrea janes
this is how we will spend our/your time:
conclusion and finish the buffet!
installation
practice
time!
introduction
break!
technical/
philosophical part
people from industry arrive
Elixir is a functional, concurrent, general-purpose programming language that runs on the Erlang virtual machine (BEAM)*.
Elixir builds on top of Erlang and shares the same abstractions for building distributed, fault-tolerant applications.
Elixir also provides a productive tooling and an extensible design.
* https://en.wikipedia.org/wiki/Elixir_(programming_language)
def sum1() do
{a, _} = IO.gets("enter a: ") |> Integer.parse
{b, _} = IO.gets("enter b: ") |> Integer.parse
a+b
end
def sum2() do
IO.gets("enter a: ") |> Integer.parse |> handle_result
end
def handle_result({number, "\n"}) do
IO.puts "You entered #{number}"
end
def handle_result({_, whaaat}) do
text = String.replace_trailing(whaaat, "\n", "")
IO.puts "You did not enter an integer. What is #{text}?"
end
def sum3() do
result = IO.gets("enter a: ") |> Integer.parse
case result do
:error -> "You entered a string!"
{a, "\n"} when a > 100 -> "You entered a number higher than 100"
{_, "\n"} -> "OK"
{_, _} -> "Incorrect input!"
end
end
Write the code to first convert to Celcius ((fahrenheit - 32) * 5 / 9) and then filter by max_celcius