Functional
programming with
Who am I?
Jørn Ølmheim, SUB Well Planning and Integrity
- More than 20 years experience
- Software craftsman
- Polyglot programmer
- Data and solution architect D&W, EITA
Written by Jose Valim in 2011
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. The latter is supported by compile-time metaprogramming with macros and polymorphism via protocols.
Installation
https://elixir-lang.org/install.html
hex
package management tool
Tuples
{:ok, "line1\nline2\nline3"}
{"Dave Thomas", "Programming Elixir", 21.50}
Lists
[1, 2, 3]
[:ok, "hello world", 42, [1,2,3]]
Keyword Lists
[{:a, 1}, {:b, 2}, {:c, 3}]
[a: 1, b: 2, c: 3]
Resources and further reading