Modules in Midio serve as an organizational tool for structuring your code, separating different parts of the program into distinct and manageable units.
A module can contain other modules, function definitions, and type definitions, allowing for a hierarchical organization of your program. In addition to these structural elements, modules can also contain flows.
Modules can also have instances of events, which is not possible inside functions.