Skip to content

iamvery/elixir-koans

Repository files navigation

📢 We have decided to combine our efforts with http://elixirkoans.io/. This project may no longer receive any attention! 📢


Elixir Koans

The Elixir Koans walk you along the path to enlightenment in order to learn Elixir. The goal is to learn the Elixir language, syntax, structure, and some common functions and libraries. We also teach you culture by basing the koans on tests. Testing is not just something we pay lip service to, but something we live. Testing is essential in your quest to learn and do great things in Elixir.

The Structure

The koans are broken out into areas by file, strings are introduced in about_string.rb, tuples are covered in about_tuples.rb, etc. They are presented in order with the mix learn task.

Each koan builds up your knowledge of Elixir and builds upon itself. It will stop at the first place you need to correct.

Some koans simply need to have the correct answer substituted for an incorrect one. Some, however, require you to supply your own answer. If you see the method __? (a double underscore question mark) listed, it is a hint to you to supply your own code in order to make it work correctly. If you see the assertion assert_?, it is a hint that you need to supply the correct assertion or refutation.

Installing Elixir

The best source of truth for installation instructions can be found on elixir-lang.org.

Enlightenment

The koans are run via Mix, Elixir's task runner.

  1. Clone the repository.

    $ git clone https://github.com/iamvery/elixir-koans.git
    $ cd elixir-koans
    
  2. Run the mix task.

    $ mix learn
    

    Note: Currently the koans generate a lot of warnings. These can probably be ignored (#4).

Annotations

For your convenience, some annotations are available for examples.

  • Skipping examples

    @tag :skip
    think "This example will not run" do
      # ...
    
  • Focusing on examples

    @tag :focus
    think "Only examples tagged with focus will run" do
      # ...
    

Inspiration

The Elixir koans are inspired by the work of beloved Jim Weirich and his Ruby Koans. This particular set of Elixir Koans is heavily inspired by this other koans project which appears to be no longer maintained.

About

📢 We've combined our efforts with

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages