Elm Arcade
Getting Started With Elm and Typed Functional Programming
Welcome to this workshop! Today we're learning Elm and typed functional programming techniques through creating the classic game Memory.
The workshop will cover the following topics:
- Tuples
- Records
- Type Inference
- Type Signatures
- Custom Types
- Type Aliases
- Pattern Matching
- Functions
- Partial Application
- Currying
- Maybe
- Running your application in the browser
- Piping
Some of these concepts may be unfamiliar and somewhat confusing to begin with, so please do ask us if and when you get stuck, or simply have a question. That's what we're here for!
Getting Started
Install
nodeversion 12 or newer (which includesnpm) from nodejs.org.Clone the repo (https://github.com/mbolstad/elm-workshop-memory) to your computer
Run
npm ci(please make sure to havenpmversion 6 or newer)Start your local application environment with
npm startin the root folder of this repo. This should open a new browser window withlocalhost:3000and a nice compilation error.Install a plugin for your editor. At the time of writing we prefer VS Code (with the Elm plugin from Elm Tooling) for Elm development so we recommend you use that, even if VS Code is not usually your main editor of choice.
Enable "format on save" for your editor. Almost all Elm projects use a tool called
elm-formatwhich is an opinionated code formatter.
Congratulations, you're now ready to begin learning Elm!
If you are having issues with the build tool, or editor not finding
elm,elm-formatorelm-test, try installing them globally withnpm install -g elm elm-format elm-test
Made by
|
Ingar Almklov
|
Erik Wendel
|