by Example

Hello world

To get started create a file named `hello_world.erl` then start the Erlang interpreter with `erl`.

To print to the console use the `io` module. The ~n adds a new line to our output.

Once the interpreter has started, compile your module  by invoking the function `c/1`.

hello() ->
    io:format("hello world~n").

$ ls

$ erl
Eshell (abort with ^G)

1> c(hello_world).
2> hello_world:hello().
hello world
Next: Values →