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!