Elixir

Elixir describes itself as a functional, meta-programming-aware language built on top of the Erlang virtual machine.

Data Types

Error Handling

Let it Crash

Errors as Data

Errors as Exceptions

  try do
    raise "oops, something went wrong"
  rescue
    e in RuntimeError -> {:error, e.message}
  after
    -- some cleanups
  end

Basics

Protocols

Streams

Streams are enumerables that are lazy and can be composed.

  • Stream.repeatedly()
  • Stream.cycle(enum)
  • Stream.iterate(start, next_fun)

References:

Backlinks: