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

  1. Install node version 12 or newer (which includes npm) from nodejs.org.

  2. Clone the repo (https://github.com/mbolstad/elm-workshop-memory) to your computer

  3. Run npm ci (please make sure to have npm version 6 or newer)

  4. Start your local application environment with npm start in the root folder of this repo. This should open a new browser window with localhost:3000 and a nice compilation error.

  5. 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.

  6. Enable "format on save" for your editor. Almost all Elm projects use a tool called elm-format which 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-format or elm-test, try installing them globally with npm install -g elm elm-format elm-test


Made by

Ingar Almklov

@ingara

Erik Wendel

@ewndl

results matching ""

    No results matching ""