Each expression must end with a dot and a white space.
'_' (underscore) is a special variable which can be assigned to any value but remains unbound when evaluated.
It is used for 'do-not-care' type values and will become clear from below examples.
'=' operaor assigns value to LHS only when it does not have a value assigned already or when the RHS is same as LHS.
Variable names that begin with a small letter are called atoms and they behave like constant literals.
Internally atoms are represented by an atom table, which uses one pointer space per atom for storage.
The atom table is not garbage collected.
'true' and 'false' are atoms and they do not equal 0 and 1.
Equality comparison operators are =:=, =/=, == and /=
Order comparison operators are <, >, =< and >=
(Note the odd way of specifying 'less-than-equal-to' sign)
Tuples are a way to group data together by making use of curly braces.
Erlang provides great list building capabilities.
For example, in the language of mathematics, a list or a set can be expressed as x = x2 where x in [1,2,3,4]
The same can be expressed in Erlang as [x*x || x <- [1,2,3,4]]
Drawing an equivalence between the above two expressions, || stands for where <- stands for in