Clarification on modules

In my last post about Erlang I made a note to myself to find out if it is possible to declare funs in the top level of a module.  According to this page,

… modules can only define functions. It is an error to assign to a variable at the top level of a module.

At least I know now.  I’m sure it is in the Erlang book but I it is hard to search through paper books when you’re looking for info.  I’ve been spoiled by search PDFs!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s