Posts Tagged ‘compilation’

Introduction to Erlang : Modules & Compilation

This entry is part 6 of 16 in the series Introduction to Erlang


A module is a container for functions; it provided the contained functions with a common namespace. Modules are used to organize functions in Erlang. Usually, a program in Erlang spans over more than one modules. You can imagine a module as a package in Java, or a header file in C.

Calling a Function

The calling convention in Erlang is module:function(argument1, argument2, ...). For example:

1> lists:max([1,3,2]).

Defining Modules

Lets say we want to create a module that will contain our own implementation of list functions and name it mlists.
Read the rest of this entry »