O'Reilly logo

Learn You Some Erlang for Great Good! by Fred Hebert

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Modules

Working with the interactive shell is a vital part of using dynamic programming languages. It’s useful to test all kinds of code and programs. In Chapter 1, we used the interactive shell to play with most of Erlang’s basic data types without ever opening a text editor or saving a file. While you could stop reading here, go play ball outside, and call it a day, that would make you a terrible Erlang programmer. Code needs to be saved somewhere to be used! As you’ll learn in this chapter, that’s what modules are for.

What Are Modules?

A module is a bunch of functions grouped together in a single file, under a single name. All functions in Erlang must be defined in modules. You have already used modules, perhaps without realizing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required