Parameterized Modules
also called Abstract Modules
or Tuple Modules
.
From Stack Overflow
1 | -module(foo). |
1 | 1> c(foo). |
From Elang Central
1 | -module(test, [A, B]). |
1 | 1> c(test). |
Ending
栗子分别来自于
http://stackoverflow.com/questions/40539120/are-tuple-modules-an-officially-documented-feature-of-the-language
和
http://www2.erlangcentral.org/wiki/?title=Parameterized_Modules
官方并不建议使用这种方式。