concept module in category erlang

This is an excerpt from Manning's book Erlang and OTP in Action.
In this chapter, we go through Erlang’s basic data types and then talk about modules, functions, and compiling and running code, before we move on to variables and pattern matching. After that, we talk about function clauses and guards, case switches, funs (lambda expressions), exceptions, list comprehensions, and binaries and bitstrings. Finally, we examine records, preprocessor includes and macros, process operations and message passing, and ETS tables, before we finish with a thorough discussion of programming with recursion.
The simplest way to compile a module when you’re playing around and testing things, is to use the shell function c(...), which compiles a module and also loads it (if the compilation worked) so you can try it out immediately. It looks for the source file relative to the current directory of the Erlang shell, and you don’t even need to say .erl at the end of the name. For example, if you start Erlang in the same directory as the file you created earlier, you can do the following:
1> c(my_module). {ok,my_module} 2> my_module:pie(). 3.14 3>The result {ok,my_module} from the call to c(...) is an indicator that the compilation worked, creating a module called my_module, which has now been loaded. You can call the function pie you exported from it to check that it works.
If you look in the directory of the source file (you can use the shell function ls() to do this), you’ll see that there is now a new file called my_module.beam alongside the source file my_module.erl. This is the compiled version of the module, also called an object file.
The first step is easy—start your favorite text editor (even if it’s Notepad), open a new file, and start typing. Give the module a name, and save the file using the same name as for the module, plus the suffix .erl. For example, the following listing shows how such a file (named my_module.erl) might look. Create this file using your text editor now.