Core Concepts

Overview

Core Elixir is the language's basic syntax, features, and execution model, focusing on the core language capabilities that drive Elixir's performance and concurrency capabilities.

Core Elixir is based on the Erlang VM and includes functions, pattern matching, immutability, and functional programming features for high-throughput web application and API creation.

Overview

The Elixir language provides a powerful functional programming environment for developers looking to build scalable, reliable and distributed applications.

        iex> Enum.map([1,2,3], & & + 1&2
        [2, 3, 4, 5]
    

This function maps over the input list, adding one to each value. This is a typical Elixir expression syntax and demonstrates basic function application and pattern matching with functions in a core way. The use of the & syntax for anonymous functions is shown here.

Basics

Atoms

Atoms represent immutable and named values. Atoms are immutable and cannot be changed, and must be declared in a file with a atom :atom_name declaration.

Variables

Variables are immutable and only declare values. You must declare the variable in the scope before using it.

var x = :a & Ecto4

<=

500px

This example sets x to "x = 1"

4

4,500