Elixir Koans

Elixir koans is a fun, easy way to get started with the elixir programming language. It is a tour of the most important features and idiomatic usage of the language.

Installing Elixir

Elixir runs on the Erlang VM, so to get started with the koans you need to install both Erlang and Elixir. The official Elixir webpage has instructions for how to do this.

Installing Inotify

If you're on a Mac, you can skip this section.

To provide the best experience, koans are run automatically when you save a file. This is accomplished with a tool called inotify which needs to be installed separately if you're not using OSX. Linux users will need to install inotify-tools (guides), and Windows users need inotify-win (guides).

Getting the koans

The next step is to get the source code of the koans so that you can run it. Assuming that you have git installed, it's as simple as:

$ git clone https://github.com/elixirkoans/elixir-koans
$ cd elixir-koans

With the source code pulled, you'll also need to fetch the dependencies for this project:

$ mix deps.get

Running the koans

Now you're ready to run the koans! On your command line, type:

$ mix meditate

You should see that the first koan has failed in lib/koans/01_equalities.ex. Open that file, and change the first koan to make the assertion true. After successfully passing the koan, you should see the next failure.

Repeat

Keep making changes to satisfy the assertions in the code. When you've finished the first file, the runner will automatically run the next file until there are no more koans.

Contributors

We'd like to thank all our contributors.

If you have any suggestions, feel free to open an issue or a pull request