December 2009
2 posts
3 tags
Joe Armstrong released elib1 - remarkable... →
5 tags
Erlang Parametrized Modules
The story of module extension continues. Another still undocumented feature of recent Erlang versions is to have parametrized modules and module instances. Have a look at this code:
-module(mytest, [Var1, Var2]).
-export([getInstvars/0]).
getInstvars() -> [Var1,Var2].
With this you can have variables known in module scope. These variables are of course immutable. Moreover you can instantiate...