At this point, the learner hasn't seen functions, the Enum module, or the pipe operator, so it feels like a little much to add that here. The reason it's needed is that the order of keys/1 and values/1 is reverse of how it's defined. This is due to an implementation detail in Erlang's maps. We /could/ use this as a learning opportunity rather than sorting them, but I'm not sure what could be said about that...
Elixir Koans
Elixir koans is a fun way to get started with the elixir programming language. It is a tour of the most important features and idiomatic usage of the language.
Prerequisites
You need to have Elixir installed. Please refer to the official guide for instructions.
Next, fetch mix dependencies by running:
$ mix deps.get
You might get prompted to install further dependencies. Reply "y".
On Linux, you'll need to install inotify-tools to be able
to use the autorunner in this project.
Running
With the dependencies installed, navigate to the root directory of this project and run:
$ mix meditate
You should see the first failure. Open the corresponding file in your favourite text editor and fill in the blanks to make the koans pass one by one. The autorunner will give you feedback each time you save.
To make the autorunner less noisy, you can start the koans with
$ mix meditate --clear-screen
Contributing
We welcome contributions! If something does not make sense along the way or you feel like an important lesson is missing from the koans, feel free to fork the project and open a pull request.