Most conventions used in the book should be self-explanatory. Listed below are some that might be a bit confusing.
We will be using the term terminal throughout the book to mean a program that lets you type and execute textual commands. If you come from Unix background, this term should already be familiar to you. But, if you come from Windows background, you can mentally replace it with command prompt.
Unix refers to a family of operating systems that includes macOS and Linux.
This book presents many commands that are run from the terminal. For simplicity, all command examples use the
$ sign which is common in Unix-based systems. You can mentally replace it with
> on Windows. Here is an example:
However, when we’re inside
> sign is shown on both Unix and Windows systems to indicate that the code is meant to be entered into an
elm-repl session. Here is an example:
When entering multi-line code,
elm-repl adds pipes (
|) in-front of each line starting from the second line. You shouldn’t type these pipes literally. Here’s an example:
Two Vertical Dots
Many code examples in the book include two vertical dots to omit a big chunk of code not relevant to the topic being discussed. You shouldn’t type these dots literally. Here are some examples:
Three Horizontal Dots
Three horizontal dots are used to omit the body of a function. Again, you shouldn’t type them literally. Here is an example:
Two Horizontal Dots
When defining a
module, the two horizontal dots (
..) have special meaning in Elm. You should definitely type them literally. Here’s an example:
We will cover modules in detail in chapter 4.