About.Types (about v0.0.9)
This provides documentation on the Elixir types
Link to this section Summary
Functions
Atoms are simple identifiers. Not garbage collected.
Boolean had the values true and false. These are identical to the atoms :true and :false
Floats in Elixir are 64-bit double precision.
Integers in elixir are unlimited precision numbers.
List - variable length list. Implemented internally as a linked list. Efficienly pattern matched [h|t] = [1, 2, 3] results in h = 1 and t = [2, 3]
Strings - the basic string type which is refered to as binary in Erlang.
Tuple, fixed length structure
Link to this section Functions
atom()
Atoms are simple identifiers. Not garbage collected.
Example: :ok
boolean()
Boolean had the values true and false. These are identical to the atoms :true and :false
float()
Floats in Elixir are 64-bit double precision.
Example: 1.2
integer()
Integers in elixir are unlimited precision numbers.
Example: 1
list()
List - variable length list. Implemented internally as a linked list. Efficienly pattern matched [h|t] = [1, 2, 3] results in h = 1 and t = [2, 3]
Example: [1, 2 ,3]
string()
Strings - the basic string type which is refered to as binary in Erlang.
Example: "Hello, world"
tuple()
Tuple, fixed length structure
Example: {:ok, result}