⚠ Warning: This repository is frozen in time, and getting no new (security) updates. It is left public, should it help and offer some guidance around its subjects to future visitors. However, for latest guidance on involved subjects, we recommend going to the official sources.
Here you will find a way for you to get to know the Elm language. If you've never programmed in any functional language (as opposed to an imperative language), you might find these examples and koans useful, especially before starting with the elm coding dojo assignment.
In the koans folder, you will find a list of koans (which are small puzzles/tests) that will teach you basic syntax of the Elm lanuage.
We thought that just the koans might not be sufficient to really get going with the dojo assignment, so we've added our own Elm tutorial in the tutorial folder. This tutorial will (hopefully) teach you about how to use functions, types, and other things you will encounter during this dojo.
We recommend you to start with our tutorial, as we wrote it with the assignment in our minds. The tutorial covers the use and creation of functions, types, type aliases, type signatures, records and pattern matching. Furthermore it shows you what a small Elm application looks like, and it helps you to understand which parts of the application do what.
If you feel like you need more examples on how operators and types work, you can also choose to check out the koans we've included. The koans folder contains about 200 tests, so it's not a good idea to start doing them all considering the time you might spend on them. Therefor we've made a selection of tests we figured might be helpful to you. Each row indicates an .elm file in the koans/Koans folder, containing a set of tests.
- AboutRecords
- AboutUnionTypes
- AboutFunctions
- AboutMaybe
- AboutLists
- AboutTuples
- AboutDictionaries
- AboutResults
- AboutAsserts
- AboutLiterals
- AboutLogicalOperators
- AboutMathematicalOperators
Even though this is a filtered set of koans you might want to do, it's presumable that you will spend too much time if you decided to do them all. If you feel you need to do some of these, don't be affraid to ask us to help you choose.
As we said, we think that the koans are probably not sufficient in teaching you enough about Elm to start the assignment, so with this in mind, try to spend your time efficiently when doing these koans.
In order to start, simply clone this repo and open a command prompt in the folder you wish to start with. Typing 'elm reactor' should start a webserver listening on localhost:8000. If you open this location in your browser, you should find a file explorer, allowing you to navigate to the .elm files you wish to start with. Simply click one of .elm files and the server should automatically download and build everything you need (will take aprox. 30 seconds).
Open the elm files in your favourite text editor and get going!
Considering the amount of time we have, it is probably a good idea to not get stuck on a problem you experience with the language too long. We are here to help, so don't feel affraid to ask us to assist you, we're glad to help out (as much as we can, we're new to Elm as well!).
- To Robert Looby for the koans.
- To Matthijs and Erik for the tutorial.