Module Library Tutorial

lua-users home
wiki

In abstract algebra, the concept of a module over a ring is a generalization of the notion of vector space over a field, wherein the corresponding scalars are the elements of an arbitrary ring. Modules also generalize the notion of abelian groups, which are modules over the ring of integers. Thus, a module, like a vector space, is an additive abelian group; a product is defined between elements of the ring and elements of the module that is distributive over both parameters and is compatible with the ring multiplication. Modules are very closely related to the representation theory of groups. They are also one of the central notions of commutative algebra and homological algebra, and are used widely in algebraic geometry and algebraic topology.

The package library provides basic facilities for loading and building modules in Lua. It exports two of its functions directly in the global environment: require and module. Everything else is exported in a table package.

Example:

module (name [, ···])

rest of the code

...

...

...

...

...

ver.0.11


RecentChanges · preferences
edit · history
Last edited August 12, 2013 3:28 pm GMT (diff)