Top

Noc works with a basic module system, thanks to this module system we can load STD modules, Internal modules or our own modules.

We can also load modules in the Noc REPL

To load any module we use this instruction:

load module

or

load "module"

To import a STD module we type firstly “std:” and the STD module name among these STD modules.

Example:

load std:stack

def main = {
    1 2 swap print
}

We can load internal modules, they are listed here.

Example:

load seq

def main = {
    [1 2 3] [1 +] step print
}
[2 3 4]