Exports

Modules allow grouping elements together that have high cohesion.

All contents which are part of one module have to be located in the same directory. You can export interfaces, classes, structs, implementations, functions, and constants from your module.

To export, add the export keyword to the elements that you would like to export:

export fn add(a Int, b Int) Int {
return a + b
}
export interface Encoder<T> {
encode(obj T) String
decode(encoded String) T
}
export struct Person {
firstName String
lastName String
}