Elixir by Example

About

Elixir by Example is a hands-on introduction to Elixir, OTP and distributed systems through small, annotated programs, in the spirit of Go by Example. It is written and maintained by Maheep Kumar.

How it works

Every example is a plain .exs file. When the site is built, each one runs on Elixir 1.20.5 / Erlang/OTP 29 and the output you see on the page is the output of that run. An example that fails, times out or prints a compiler warning stops the build.

The Run buttons boot the Erlang virtual machine in your browser, compiled to WebAssembly, and run the example there. Your code never leaves your browser; the only thing sent is an anonymous count of runs per page (no cookies, no IP addresses). Before every deploy, each example is also run in a headless browser and its output compared with the native run.

Spotted a mistake or want an example? Open an issue or send a pull request; the source is MIT licensed.

Built on

This site exists thanks to these open-source projects and their maintainers:

Elixir and Erlang are trademarks of their respective owners. This is an independent project, not affiliated with or endorsed by the Elixir team, the Erlang/OTP team or Software Mansion.