Running Elixir
Explore how to run Elixir through interactive sessions using IEx, understand its helper functions, and learn to compile and execute Elixir scripts from source files. This lesson prepares you to move beyond simple commands to writing and running full Elixir programs.
We'll cover the following...
We'll cover the following...
Interactive Elixir with iex
Let’s start an interactive Elixir (IEx) session. In the terminal below, type “iex”.
Once we have an IEx prompt, we can enter the Elixir code, and we see the result. If we enter an expression that continues over more than one line, IEx prompts for the additional lines with an ellipsis (...).
There are several ways of exiting from IEx, but none are tidy. The easiest two are typing ...