Erlang-Training is a project mainly written in Erlang, it's free.
Lab files from Kevin Smith's erlang training
true
, hello
, 'WORLD'
<<"Hello World">>
[1,2,3]
"Hello, World"
(a string of characters [which are just integers]){greeting, <<"Hello there!">>}
12345
=
operator
A = 10.
{RecordType, Car} = {car, "Challenger"}.
Message = "Hello, world!".
A = [1,2,3,4,5].
[X * 2 || X <- A].
[2,4,6,8,10]
A = [1,2,3,4,5].
[X || X <- A, X rem 2 == 0]
erlc
(to compile .erl to .beam)erl -pa
(for load path)m(module_name)
gives info about modulec("/path/to/file.erl")
or c(demo)
to compileComma separates sequentially executing statements (,)
X = 2, X1 = X+2, X2 = X1 + 2.
Semicolon separates related but distinct things (;)
Period terminates a block of things or a single thing (.)