Skip to content

The Erlang Programming Language

Erlang

Practical functional programming for a parallel world

What is Erlang/OTP?

Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang’s runtime system has built-in support for concurrency, distribution and fault tolerance. Erlang Quickstart

OTP is set of Erlang libraries and design principles providing middle-ware to develop these systems. It includes its own distributed database, applications to interface towards other languages, debugging and release handling tools. Get started with OTP

Overview

fact(0) -> 1;              %% Pattern matching for control-flow
fact(N) -> N * fact(N-1).  %% Recursion to create loops
 
> example:fact(10).        %% Interactive shell for fast iterations
3628800
> [{I, example:fact(I)} || I <- lists:seq(1,10)].
[{1, 1}, {2, 2}, {3, 6}, {4, 24}, {5, 120}, {6, 720},
 {7, 5040}, {8, 40320}, {9, 362880}, {10, 3628800}]