Elm is a programming language that provides a clean functional syntax for writing HTML web applications. It promises zero runtime exceptions, fast rendering, time-travel debugging, and much more.
Understand the three basic parts of making HTTP requests in Elm: 1) Building the request, 2) Writing a JSON decoder, 3) Sending the request using the Elm runtime, and reacting to the results with m...
List are an important collection in Elm. In this lesson we learn to create list as well as apply functions to filter, add, and transform them.
Records are important data structures in Elm. In this lesson we learn to create a record as well as describe the record by creating a type. We will also see how these new types can be used to clean...
Functions are an important building block in Elm. In this lesson we will review stateless functions, function composition, anonymous functions, Currying, and more.
Before writing any Elm we need to first install the runtime locally. In this lesson we install the Elm runtime locally and set up a simple application to verify everything is working properly.
Decoding JSON strings in Elm is a 2-step process: Create a "recipe" for the decoding Perform the decoding This lesson gives a couple basic examples of the two steps in action.
Notice: This lesson uses Elm 0.17! Here's a document about the important differences between 0.16 and 0.17. This lesson gives a rapid-paced introduction to what's known as the Elm Application Ar...
Elm includes a data type called Maybe which is useful for working with values that may, or may not exist. This lesson shows a simple case where maybe types are encountered, and how to make them use...
This lesson will take you from nothing to a small Elm app that prints text to the browser.
We are going to take a high-level look at what an Elm application looks like? We show how to structure apps, as well as, Elm’s elegant syntax by building a small app.
showing All 32 lessons...
Notice: This lesson uses Elm 0.17!
This lesson gives a rapid-paced introduction to what's known as the Elm Application Architecture. You can read about it in greater detail here:
We'll build a counter that utilizes the standard Elm combination of a model, a view, and update function.
See the linked code for a good starting place.
Elm comes with an index of publicly-usable open-source packages. Using packages from this index can substantially improve a developer’s experience. Learn how to find a package through the index, understand its API through type annotations and documentation, download it, and use it in a project.
Elm packages aren't working with embedded Ellie, so I've provided you with a link to the Ellie example here.
Functions are one of the core building blocks of Elm. In this lesson we learn how to define, call, pass parameters, receive parameters, partially apply functions, compose functions, and add correct type signatures. In this lesson we will show how to define functions with type signatures.
In this video you will learn about union types in Elm. Union types have no equivalent in mainstream languages like Java or JS, but they provide a powerful way to model your program's data. We'll also see how the values in union types aren't just values, they're functions! So we'll see how we can leverage this to do some powerful things.
Follow along using this online Elm editor.
An important union type of the Core library, Maybe is used to represent the possible absence of data.
Follow along the documentation at package.elm-lang.org/packages/elm-lang/core/latest/Maybe and download the Elm REPL from elm-lang.org/. If you'd like to try it out in your browser I've provided a link to the Elm repl here.
Recursive Union Types in Elm enable you to simply and effectively model list-like or tree-like structures.
For an explanation of simple union types, watch Define simple union types in Elm.
In this lesson you will learn to use Elm's type and module system to make invalid data unrepresentable, a robust approach to ensure that your data is always consistent!
You should know the basics of union types before tackling this content, they're explained here in Define simple union types in Elm.
You can follow along using any editor and Elm reactor; if you need help with the setup, watch Installing and setting up Elm.
Unlike many languages, Booleans in Elm are just a plain union type.
Follow along at http://elm-lang.org/examples/hello-html
Type annotations are options in Elm. Adding type annotations can bring a good deal of clarity about which types you are using and what your program does with them
In this lesson we'll be adding type annotations to this Hello World program
In this lesson we'll use the Elm REPL to learn about the various types in Elm, such as
Int. We'll also see how all operators in Elm are just functions.
Try it out for yourself here in the Elm repl!
Tuples are a very simple way of associating values to form a data structure. They can be used to model simple structures in your program and often appear in the APIs of the Core library.
In this lesson learn how
alias types, and destructure tuples in function arguments. To follow along check out the elm repl here. I've also provided you with the lesson code down bellow.
In this lesson we'll go over how to create Records, use them in functions, and how to access data from them. Try it out for yourself here in the Elm repl!
In this lesson, we will look at updating a Record's value. We'll see how we can keep simply update a single field of a record without changing the rest by using a function and a pipe ->
We'll also see how we can update multiple values with a comma separated list as well as look how to update deeply nested values.
Records in Elm are very basic structures. In this lesson we'll be going over how to add more meaning and robustness to these simple Records.
type alias allows you to specify types for specific fields within your Records, we'll learn why this is useful and how we can even constrain functions to certain types of Records.
Understand the three basic parts of making HTTP requests in Elm: 1) Building the request, 2) Writing a JSON decoder, 3) Sending the request using the Elm runtime, and reacting to the results with messages.
HTTP requests are just pieces of data in Elm. When we want to send them, we hand them off to Elm's runtime, and it notifies us when the request is done. An important part of working with HTTP requests that fetch JSON is JSON decoding, the process by which we can turn untyped JSON data into Elm types that are safe to work with.